|
From: Pete Helgren
update FileA a set a.date = 070810
where exists
(select b.job,b.ssn from ppay408b b where a.job=b.job and
a.ssn = b.ssn and a.date <> 070810)
I ended up with an error about a duplicate record in FileA (presumably
because the FileA record with | 0023 | Fodserv| 070728 would be
updated to | 0023 | Fodserv| 070810 which already exists. So the
question is: How do I omit records that could potentially become
duplicates? In the case above, the SQL would attempt to update the
first two records since they did not have a date value of 070810.
The follow up question is: Is there a way to update both files at once?
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.