Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sender JDBC: help to construct Update statement


I need help in writing a update statement to DB2 database in sender JDBC adapter.

The sender adapter picks up only few records say 10 at a time which match the Select query condition. So I would need to update only those selected "n" records and not all the records that match the Select query condition.

Select looks like :

Select * from <table> where <condition> fetch first <n> rows only.

But it is not allowing the following update

update <table> set <field> = <value> where <field> IN (Select * from <table> where <condition> fetch first <n> rows only)

The above statement errors because DB2 does not allows u201CFetchu201D statement within the update sub query.

Any pointers to a write update statement for n records is highly appreciatedu2026


Former Member
Not what you were looking for? View more on this topic or Ask a question