I have two DB2 cursors accessing the same tabel but in adifferent order.
I open the first one, fetch all the data, Then close it.
When I open the second one with the new order, it starts at the last row of the first cursor. I even tried doing a commit to see if it would clear but it doesn't.
How can I get the second cursor to start at the first row in the new order?
Thanks
below are the definitions of the two cursors:
EXEC SQL
DECLARE NUM-ACCT-CURSOR CURSOR FOR
SELECT NUM_OFFICE
,NUM_ACCT
,KEY_TMS
FROM TCLIENT
WHERE NUM_OFFICE <= 799
ORDER BY NUM_OFFICE, NUM_ACCT
WITH UR
END-EXEC.
EXEC SQL
DECLARE KEY-TMS-CURSOR CURSOR FOR
SELECT NUM_OFFICE
,NUM_ACCT
,KEY_TMS
FROM TCLIENT
WHERE NUM_OFFICE <= 799
ORDER BY KEY_TMS
WITH UR
END-EXEC.