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



Check out the WHERE CURRENT OF clause in the SQL Reference, for UPDATE and DELETE

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/db2/rbafzupdt.htm

Also, consider the use of the FOR UPDATE OF clause on the SELECT statement, to limit which columns are affected.

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/db2/rbafzupdateclause.htm

Brian.

On 09/04/2018 15:16, Art Tostaine, Jr. wrote:
What's the best way to update a row after it's read and processed in a SQL
Loop? Can I just do an update in the loop?

EXEC SQL DECLARE CURSOR C
DOW SQLSTT = 00000
EXEC SQL FETCH NEXT
EXEC SQL UPDATE?
EXEC SQL FETCH NEXT
ENDDO

Thanks


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.