would this not work?
UPDATE PVIDAL/INSPEC SET INMJMN = '6' WHERE exists (SELECT * FROM
AERODTATST/INSPEC, AMFLIBN/RTGOPR
WHERE INSPEC.INITEM = RTGOPR.RTID AND RTGOPR.WKCTR='CA00') and
INSPEC.INATRB Like
'%ANODIZE%' AND INSPEC.INMJMN<>6

Thanks,
Tommy Holden




Peter Vidal <Peter_Vidal@xxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
04/17/2007 02:48 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
cc

Subject
Re: SQL UPDATE with SELECT not working






"UPDATE PVIDAL/INSPEC SET INMJMN = '6' WHERE EXISTS..."

I do not want to update all records. I am doing things wrong,
definitively.

I want to update just the ones that follow this selection criteria
described below.

Files: INSPEC, RTGOPR
Key fields: INSPEC.INITEM, RTGOPR.RTID

I want to UPDATE NISPEC.INMJMN = '6' only where:

a) INSPEC.INITEM = RTGOPR.RTID
b) INSPEC.INATRB Like '%ANODIZE%'
c) INSPEC.INMJMN<>6
d) RTGOPR.WKCTR='CA00'


Peter Vidal
PALL Corporation / SR Programmer Analyst, IT Development Group
10540 Ridge Rd., Ste 203, New Port Richey, FL 34654-5111
http://www.pall.com

"The first step to getting the things you want out of life is this: Decide

what you want."
Ben Stein

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.