on 05-14-2008 4:13 PM
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
please check
UPDATE TABLENAME SET FLAG = 'PROCESSED' WHERE
(SELECT SELECT TOP 100 * FROM TABLENAME WHERE FLAG = 'UNPROCESSED'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.