× 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.



What are you WHERE'ing to? Can you state in English what you want the query to 
do? Do you want the update to occur only if a condition is meet in the 
subquery? You may need a correlated subquery.  

-----Original Message-----
From: Steve McKay [mailto:nospammers1@xxxxxxxxx]
Sent: Tuesday, March 01, 2005 9:14 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: SQL UPDATE of SELECTed records


All -

My apologies for posting in the RPG group - I didn't find an SQL group.

I am trying to UPDATE several records returned by a SELECT statement but am 
getting SQL0104 (Token <END-OF-STATEMENT> was not valid. Valid tokens: < > = 
<> <= !<).

Can this be done?  Current statement looks like this:

UPDATE library/file
SET field = 'U'
WHERE
(SELECT fields
FROM library/file
WHERE conditions)

Obviously, I've left out actual library and field names plus the conditions 
that I'm testing, but you get the idea.

Thanks in advance,

Steve 








As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.