Hail,
I'm trying to query one database and insert the result into another table from another DB. I use DAO in VB, and this is what I wrote so far, but I can't seem to get the IN syntax correctly:
Dim DBref As Database
Set DBref = OpenDatabase("", 512, false, "ODBC;DSN=WebBillingRefiner"
DBref.Execute ("INSERT INTO dbo.PatDataMigration.SRB_ModeratorMigration2 (SRB_ModID) SELECT OSS_SRB_MODERATOR_ID FROM C_OSS_SRB_LINK WHERE OSS_RES_FLG = 0 AND OSS_SRB_MODERATOR_ID <> 1"
BTW, I have reference DAO 3.6 and WebBillingRefiner points to a database that's under the same server as PatDataMigration so shouldn't I be able to use both?
Phailak
I'm trying to query one database and insert the result into another table from another DB. I use DAO in VB, and this is what I wrote so far, but I can't seem to get the IN syntax correctly:
Dim DBref As Database
Set DBref = OpenDatabase("", 512, false, "ODBC;DSN=WebBillingRefiner"
DBref.Execute ("INSERT INTO dbo.PatDataMigration.SRB_ModeratorMigration2 (SRB_ModID) SELECT OSS_SRB_MODERATOR_ID FROM C_OSS_SRB_LINK WHERE OSS_RES_FLG = 0 AND OSS_SRB_MODERATOR_ID <> 1"
BTW, I have reference DAO 3.6 and WebBillingRefiner points to a database that's under the same server as PatDataMigration so shouldn't I be able to use both?
Phailak