select 1 as X,d.* into [TravelData] from OPENROWSET('SQLNCLI','Server=<redacted>',
'exec [OtherDB].[GetTravelData] 1, ''28-Nov-2016 16:00'', ''28-Nov-2016 19:00''') as d
I have this as a way to slurp remote DB into a local table. This syntax appears to work BUT I get error:
There is already an object named 'TravelData' in the database.
Makes sense, SELECT INTO is supposed to create the table. But thinking I'd simply change SELECT
to INSERT
I then get syntax errors. What should the correct syntax be to get this data into an existing DB table whose structure matches the query output?