I have some code that disables a trigger on a table, runs an update, and reenables the trigger. It doesn't drop the source table or update the schema.
This would all be fine, but at the same time there are separate queries running that use that table as the source for a SELECT INTO. For some reason, when the two queries are running at the same time, I get this error:
Schema changed after the target table was created. Rerun the Select Into query.
(I'm selecting into a temp table.)
So, my first question:
Does calling "DISABLE TRIGGER" or "ENABLE TRIGGER" change the schema of a table in TSQL?
And my second question:
Why would the second query report a schema change, when the destination is a temp table?