I have two cursors as below:
EXEC SQL
DECLARE C1 CURSOR FOR
SELECT DISTINCT FIELD_1
FROM TABLE
WHERE FIELD_2 BETWEEN :MAX_DATE
AND '9999-12-31'
AND FIELD_3 = :VALUE
WITH UR
FOR FETCH ONLY
END-EXEC
EXEC SQL
DECLARE C2 CURSOR FOR
SELECT DISTINCT FIELD_1
FROM TABLE
WHERE FIELD_2 BETWEEN :MIN_DATE
AND '9999-12-31'
AND FIELD_3 = :VALUE
WITH UR
FOR FETCH ONLY
END-EXEC
Both the cursors are pointing to same table. How can I combine the two cursors? Please let me know a way to combine the two tables.