Sybase Cursor Problem
Posted on 2004-08-26
I have a Requirement like this
DECLARE EMP_CURSOR as select A1,A2 where some condition
(if another condition)
DECLARE EMP_CURSOR as select A1,A2 where some other condition
/* Do some processing : same for both the condions*/
This is working file if only one condition is satisfied . But if both the conditons are satisfied its giving an error
"there is already a cursor name EMP_CUR at level 1".
I don't want to move the cursor Processing code to both the if condition and duplicate it as it is very big(30 lines) .
Any help will be greatly appricciated..