I'm having trouble using some of the newer/odder INSERT/SELECT INTO syntax's
They run just fine from a .SQL dialog from VS2015, but not within a SQL unit-test.
In all cases I am populating a temp table and using MSSQL 2015.
This standard syntax works just fine in both a SQL unit-test and as a SQL script in DevStudio;
However, these will not work in a unit-test but if you copy-n-paste into a script they work fine;
or
The error is;
Your help is appreciated.
They run just fine from a .SQL dialog from VS2015, but not within a SQL unit-test.
In all cases I am populating a temp table and using MSSQL 2015.
This standard syntax works just fine in both a SQL unit-test and as a SQL script in DevStudio;
Code:
INSERT INTO #Expect ([Name], [System_Type_Name]) VALUES ('Mail_Option', 'Varchar(20)'
Code:
SELECT * INTO #Actual FROM OPENROWSET('sqlncli', 'server=xxx;Trusted_Connection=yes;','EXEC xxx')
Code:
INSERT INTO #Actual EXEC dbo.Xxx
Code:
System.Data.SqlClient.SqlException: Incorrect syntax near the word 'INTO'.