I'm using embedded SQL to update a counter in a database field, but would
also like to know the new value of that counter without having to retrieve
the newly updated record.

For example, using embedded SQL in my RPGLE, as follows...

exec sql
update fileX
set counter = counter +1
where keyfield = :something

I need to be able to control subsequent logic if the counter has reached a
certain limit. I'd like to not have to re-retrieve the record to find out
if the limit has been reached.

Anyone have any ideas?

Thanks

Tom Garvey


This thread ...

Follow-Ups:

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

This mailing list archive is Copyright 1997-2019 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].