Anyone knows how is possible to prepare the cursors select statment
into a variable like "prepare" in informix.
we have to solve the following problem:
we must include where clauses according to the values of one variable
For example:
v_select := "select * from my_table where my_field = my_value"
if my_par_1 is not null then
v_select := v_select, " and my_2nd_field = ", my_par_1
end if
if my_par_2 is not null then
v_select := v_select, " and my_3rd_filed = ", my_par_2
end if
...
- and i'd want to use v_select instead of select statement in
- my cursor declaration
open :v_cursorvar for v_select --- ??? is it possible ???