View Single Post
  #1 (permalink)  
Old October 4th, 2004, 10:10 AM
drarem drarem is offline
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I merge two databases and tickets tables?

The basic code I have as below, to merge Tickets1 table into Tickets table, provided you brought in Tickets1 via Get External Data..

How would I merge database on c:\dir1\event.mde (table tickets) into f:\dir3\subdir\event.mde (table tickets)?


Private Sub Command1_Click()
''INSERT INTO maintable SELECT * from temptable WHERE someidfield NOT IN (select someidfield FROM maintable)
Dim strLogs As String

strLogs = "INSERT INTO [Tickets] SELECT * FROM [Tickets1] WHERE [TicketID] NOT IN (SELECT [TicketID] FROM [Tickets]);"
DoCmd.RunSQL strLogs
End Sub

aCk!
__________________
aCk!
Reply With Quote