So, recently a DBA is trying to tell us that we cannot use the syntax of
SELECT X, Y, Z INTO #MyTable FROM YourTable
To create temporary ta
Why not do the following?
SELECT X, Y, Z INTO #MyTable FROM YourTable WHERE 1 = 2
The statement would run instantly - creating your temp table and avoiding any possible locking. Then you could insert into it as usual:
INSERT #MyTable SELECT X, Y, Z FROM YourTable