Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 move records between tables in different databases

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-03-09 : 08:29:35
Jesse writes "I found an article dated 8/15 titled "Using SELECT to INSERT records", but this seems to work only in the same database.

I need to do the same thing between databases. The line of SQL I am using from VB6 Enterprise is:

sSQL = "insert customer (cucusn, cuname) select cucusn, cuname from public.cuarrc "
With frmBackground.adodcLADS
.Caption = "CusMas"
.Enabled = True
.RecordSource = sSQL
.Refresh
End With

I get the following error
[TOD][ODBC][GENESIS][pos: 8 'insert ^customer( cu...'] - syntax error

I have verified that the table and field names are correct in both databases.

What am I doing wrong?

Thanks,

--Jesse Tutterrow, A+, Net+, MCSE, MCT, CTT, CCNA

Windows ME no service pack
VB 6 Enterprise no service pack"
   

- Advertisement -