SELECT * INTO .. (to copy a table to SQL Server Database)
Posted on 2002-06-06
I want to copy a table to a SQL Server database from an Access database using the query 'SELECT * INTO .. '
I have two DSNs. The source is Microsoft Access Driver and destination is SQL Server. I am executing this query in the context of Access DSN.
The query I used is: (which is not working)
SELECT * INTO [DSN=GG_SQLSrvr;DRIVER=SQL Server; UID=gg;PWD=****].[deviceinfo_dest] FROM [deviceinfo_src]
The error I am getting is "Could not find file 'C:\Uitls\DSN=GG_SQLSrvr'.
I set the select into/bulk copy option for the destination database in SQL serevr. (If I give a *.mdb file instead of the DSN string it’s working fine. But that’s not my requiremnt.)
1.What is the working query for this purpose? Even if the table 'deviceinfo_dest' does not exist I want to create it with the query.