cancel
Showing results for 
Search instead for 
Did you mean: 

jdbc adatper - sender adapter

Former Member
0 Kudos

hi i am using a jdbc adapter to connect to the sql database. in the jdbc sender adapter under the :

Query SQL statement field, I use --> SELECT TOP 100 * FROM TABLENAME WHERE FLAG = 'UNPROCESSED'

Update SQL Statement field, I use --> UPDATE TABLENAME SET FLAG = 'PROCESSED' WHERE FLAG = 'UNPROCESSED'.

there are 1000 records in the table. the above update statement updates the flag as 'processed' for all the 1000 records in the table.

what i want to achieve is that when i query 100 unprocessed records from the table, i want to update the flag as 'processed' only to those 100 records. in that case, what should my update SQL statement look like.

please explain.

thanks.

krish

Accepted Solutions (1)

Accepted Solutions (1)

GabrielSagaya
Active Contributor
0 Kudos

please check

UPDATE TABLENAME SET FLAG = 'PROCESSED' WHERE

(SELECT SELECT TOP 100 * FROM TABLENAME WHERE FLAG = 'UNPROCESSED'

http://archive.midrange.com/rpg400-l/200503/msg00013.html

Answers (0)