Thank you for your comment Jeff, I will definitely be trying that next.
For anyone else who is attempting this, here is how I solved what I was doing wrong. I entered the following code into the first Execute SQL task (" " is included in the actual code):
"IF OBJECT_ID('" + @[User:
estinationTable] + "', 'U') IS NOT NULL
DROP TABLE "+ @[User:
CREATE TABLE "+ @[User:
Field1 INT NOT NULL,
Field2 INT NOT NULL );
This got it to check if the variable I had set was a table, to drop it if it was, and recreate a new table with two columns: Field1, and Field2.
Does anyone know if there is a proper way to copy all of the column headers before dropping the table by means of SQL code? This way I could create a new table with all of the same fields automatically. I know I could right click in 'Microsoft SQL Management Studio', but I am trying to optimize this.
-Also note I am using a flat file source which does not have the correct column headers, the specific column headers exist only in the tables I am trying to overwrite.