There are several way that comes to my mind
1. Why not declare 2 different cursors than use if statements to decide which cursor will be opened?
2. If you need some kind of fancy cursor declaration, you may union both SQLs (they need to select same types) and then make only one of them fetches data. Something like this
3. You may use dynamic sql with open cursor for ... using ... OPEN-FOR-USING
You may extend the list, but simple is safer so if I were you I would go for 1.
posted 6 years ago
hi fatih thanks for replying
i already use point 1 as your suggestion
and thanks for your help
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad: