Skip to Content
0
May 05, 2016 at 04:24 PM

Sender JDBC (I-Series) fetch first N rows only

64 Views

Hi Team,

I'm trying to pull 1,000 rows at a time from an I-Series table via JDBC PI 7.31.

There are 10,000 rows from the table and I want to pick 1,000 at a time and create a PI message.

Then the next 1,000 row will be picked and so on..

The below Query statement works fine.

SELECT * FROM ISP#HB WHERE HBPROCESSD !='X' FETCH FIRST 1000 ROWS ONLY

However, I would also need to update the each rows with an 'X' to indicate that it was picked.

I tried to use the same syntax "FETCH FIRST 100 ROWS ONLY" but it does not work for update statement.

UPDATE ISP#HB SET HBPROCESSD = 'X' WHERE HBPROCESSD !='X' FETCH FIRST 1000 ROWS ONLY

Thanks,

Carlo