|
I understand what you're trying to accomplish, Art, but as Charles
pointed out the MERGE needs to find something. You're trying to save
yourself having to separately check if the row exists before deciding
whether to insert the row or update. When I've done this I joined the
table with another table that had related data in it to use when needing
to insert a new row in the first table. Thus, there would always be a row
for the MERGE to find but one side of the join would be NULL columns if
the row did not exist in the first table. Thus, the MERGE could either
MATCH or NOT MATCH as appropriate. Do you have a related table you can
join to your table?
Sincerely,
Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300
Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio 45439 USA
(937) 294-5331
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.