|
Marco,
I have found that you need to state the connection between the 2 files
twice. Once to select the field that has the new value, and a 2nd time
to eliminate any null values from mis-matches.
Try this
UPDATE EI_Gcfmd A SET A.DESEMD =
(SELECT B.DESEMD
FROM EI_GcfmdMS B
WHERE B.GFMEMD = A.GFMEMD AND
B.EMBEMD = A.EMBEMD AND
B.MODEMD = A.MODEMD AND
B.CIAEMD = A.CIAEMD AND
B.SOCemd = A.SOCemd)
WHERE EXISTS
(SELECT 1
FROM EI_GcfmdMS B
WHERE B.GFMEMD = A.GFMEMD AND
B.EMBEMD = A.EMBEMD AND
B.MODEMD = A.MODEMD AND
B.CIAEMD = A.CIAEMD AND
B.SOCemd = A.SOCemd)
HTH
Jim
On Fri, May 16, 2008 at 3:28 AM, Support Mwbrands <
support.mwbrands@xxxxxxxxx> wrote:
Help out here with this update query.that
I have table 1 and table2.
Table1 have my product discriptions and table 2 have new descriptions
I--
want on tabel1
I need to update table1 with the values on the table2
I have this: (also provided from a this forum friend)
UPDATE EI_Gcfmd A SET A.DESEMD = B.DESEMD
WHERE EXISTS
(SELECT 1
FROM EI_GcfmdMS B
WHERE B.GFMEMD = A.GFMEMD AND
B.EMBEMD = A.EMBEMD AND
B.MODEMD = A.MODEMD AND
B.CIAEMD = A.CIAEMD AND
B.SOCemd = A.SOCemd)
What is missing here??
PLEASE HELP ME
Regards,
Marco
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
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.