I am just getting started in SSIS for SQL Server 2016. I am trying to simply DROP TABLE before I create a new one, and I am using an Execute SQL Task as a first step before the Data Flow task to create the new table. I am getting an error that the object does not exist. It seems like this would be a very common thing to do in SSIS, and I have been reading through many SO posts on this particular task, but so far nothing on how to ignore an error. I was expecting to see a property for Execute SQL that allows ignoring errors, or an error connector, or something similar. Is there something in this task I missed, or is this the wrong way to make sure a table does not exist before trying to create a new one?
You could use drop if exists
syntax inside EXECUTE SQL task:
DROP TABLE IF EXISTS tab_name; -- supported starting from SQL Server 2016