We are trying to create subsets by using the MS SQL Direct Insert scripts and selecting Create Table as Select option while doing it. It doesn't seem the generated SQL scripts correctly. They fail to properly check if the tables exist on the target and create and insert the data there. The image below shows how my options are selected.
While running the insert script, we see the following error:
Error executing insert SQL
Changed database context to 'creditcard'
Msg 301, Level 11, State 5, Server 769ZZY2, Line 3
Cannot drop the table 'CREDITCARD_SUBSET.dbo.CARD_ACCOUNT', because it does not exist or you do not have permission.
Solution Engineering has determined the SQL Server insert script is creating an extra "," during the generation of the script for L0 temp table, also the Use database should be the target database and not the source one.