Toad World® Forums

SELECT INTO not working for Cross-Connection Query (SQL Server)?

I am trying to simple copy data from a table in one DB to a new table in another DB (select * into [db1] from [db2]), but TOAD keeps throwing an error.

CODE
select *
into TRIAGE PROD BOX.FM_SPSS_TRIAGE_Work.dbo.Material_Dev_20161219
from TRIAGE DEV BOX.FM_SPSS_TRIAGE.dbo.YMKT_TRIGGERBASE_MATERIAL

ERROR
ERROR: line 2, column 40, ending line 2, column 40: Found ‘.’: Expecting: end-of-input -or- ; -or- EXCEPT INTERSECT MINUS UNION -or- CLUSTER DISTRIBUTE FOR GROUP HAVING INTO LIMIT LOCK OFFSET ORDER PROCEDURE SORT UPDATE -or- ,

If I comment out the INTO portion, I can select just fine, so the db name syntax seems to be correct. Perhaps INTO doesnt work on cross connection queries?

We don’t support INTO for cross-queries. We do support querying from one database and inserting into a different database. this would need to be done using the export/import wizard and not in a script.

Thanks Debbie, got it.

Hi.
Are updates and Inserts still not supported in TDP or have they been implemented in recent versions?

Regards
Asif