Hello
I have a series of select statments and i am writing its output to a file, these sql statments required a 3 substitution variable and i am deriving those variables from some tables.
something like this
my sql file
var my_var1 varchar2(15)
var my_var2 varchar2(15)
var my_var3 varchar2(15)
begin
select v1,v2,v3 into
:my_var1, :my_var2, :my_var3 from some_table;
end;
spool my_location
select some_value
from my_table
where my = &my_var1;
select some_value2
from my_table2
where my2 = &my_var2;
.......
.........
and so on.....
almost 15-16 sql statments...
I know this will not work is there any other way of assigning value from bind variable to my subs variable ...
1 constraint i have is i need the sql output of only select statments
Please help...