INSERT / UPDATE Query in same operation

  • Thread starter Thread starter JensB
  • Start date Start date
J

JensB

Hi

This is a backend database for .NET application
Table1 is a linked table to a text file on the network, which is updated
from an ERP system.
Table2 is the table my application uses when the PC is offline.
I want to update Table2 with Table1 on those rows who exist in both tables,
and insert the new rows from Table1 into Table2,
in the same SQL call.
Is it possible at all?

Regards
JensB
 
No. However you could put both queries in a macro or code and they would run
so fast that you wouldn't know the difference. You could even Set Warnings
off before the first query then Set Warnings on after the last. That way you
wouldn't even get bothered with the "You are ... x records" messages.
 
Jerry
Thks for answer
The issue about speed was also important, and you are right about error, it
is better to separate the call.
JensB
 
Back
Top