× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

If you are already on release V5R4 the following syntax should work:
UPDATE phdmass01/STCHSP 
   SET R9CEAA = 'N' 
   WHERE (r9nmid, Field2, Field3, ... FieldN) in (SELECT (r9nmid, Field2x,
Field3x ... FieldNx) 
                                                     from union/phdmassd)

You may also try:
UPDATE phdmass01/STCHSP a
   SET R9CEAA = 'N' 
   WHERE Exists (Select * from Union/phdmassd b
                   where a.r9mnid = b.r9mnid and a.Field2 = b.Field2 and
a.Field3 = b.Field3 ...)   

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them?  Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Mark Allen
Gesendet: Wednesday, January 31, 2007 16:07
An: Midrange Systems Technical Discussion
Betreff: SQl update with Sub Select


UPDATE phdmass01/STCHSP SET R9CEAA = 'N' WHERE r9nmid in (SELECT r9nmid from
union/phdmassd)

I've done this with no problems (see above), the issue is that I need to
make the WHERE/Select on multiple fields (The Where would ahve multiple
fileds from the update file and all of those fields must match a record in
the Select file (field names are the same in both files)

drawing a big blank.......


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.