Can someone help me modify this query from MSSQL to DB2? I'm a novice and don't know exactly what query does. I do know that it connects the the indexdb table. I don't know what the CSR function is, nor what it does. Thank you for your help.
-- ms-sql server 7.0
PRINT "Query2: F_DOCNUMBER > 100200; ; 300 ; ;"
DECLARE csr CURSOR FOR
SELECT f_docnumber FROM doctaba
WHERE (f_docnumber > 100200) AND
((f_deletedate is not null and f_retentbase='1' and f_deletedate >= 9443) OR
(f_archivedate is null and f_deletedate is null) OR
(f_archivedate is not null and f_retentbase = '1' and f_archivedate >= 9443))
ORDER BY f_docnumber