5 pts.
 Fetching one cousor within DO loop of another cursor
Is the below scenerio possible, if yes then how? CREATE C1 CURSOR OPEN CURSOR C1 FETCH C1 CURSOR DOW SQLCOD = 0 (For Cursor C1) CREATE C2 CURSOR OPEN CURSOR C2 FETCH C2 CURSOR DOW SQLCOD = 0 (For Cursor C2) CLOSE CURSOR C2 FETCH CURSOR C2 ENDDO FETCH CURSOR C1 ENDDO CLOSE CURSOR C1

Software/Hardware used:
ASKED: August 6, 2009  4:44 AM
UPDATED: August 6, 2009  1:23 PM

Answer Wiki:
You essentially had all the steps you need. It just appears you were trying to close C2 too soon <pre> CREATE C1 CURSOR OPEN CURSOR C1 FETCH C1 CURSOR DOW SQLCOD = 0 (For Cursor C1) CREATE C2 CURSOR OPEN CURSOR C2 FETCH C2 CURSOR DOW SQLCOD = 0 (For Cursor C2) ... FETCH C2 CURSOR ENDDO CLOSE CURSOR C2 FETCH CURSOR C1 ENDDO CLOSE CURSOR C1 </pre>
Last Wiki Answer Submitted:  August 6, 2009  1:23 pm  by  BigKat   7,175 pts.
All Answer Wiki Contributors:  BigKat   7,175 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _