sql - Oracle: Opening the same cursor within different IF statements -
Is it possible to open a cursor within a So basically, the cursor must be filled in by the target, on which the I do not see any problems with your requirement and your efforts. Since, the IF statement block:
Process pattern (Ultimate, IoCoSers inTickers in IIT) ISV Coser Tickser; BEGIN If the Ultimate = 1 then select from Table 1 to IN.ER, open v_cursor for a.field, table.b at b.fieldid = a fieldid; Io_cursor: = v_cursor; Close v_cursor; ELSIF Ultimate = 2 Select from a.field, from c.field to Table 1 Join an INNER Include b.fieldid = a.fieldid INNER on table 2b table3c ON c.fieldid = a.fieldid; Io_cursor: = v_cursor; Close v_cursor; end if; End Consortium;
if statement is correct.
IF-ELSE condition is not allowed in the cursor, however, in
PL / SQL , you can do
REF CURSOR :
Ders Koor Ref Croser; If BEGIN (so many more) then the 'selection' from 'selection' is 'Table_1'; ELSE (so and so) is open and 'Select * Form Table_2'; end if ; End;
Comments
Post a Comment