I am using a SQL script to spool data and load data into XML
I want to check whether I can use variable in the SQL script which get it value from another SQL query.
Something like this:
var1= select count(1) from emp
spool filename
select * from dept where empcnt=var1
Will it work? Is this the best way or any other way of doing it?