February 17th, 2011, 03:12 PM
Join Date: Oct 2010
Time spent in forums: 3 h 42 m 7 sec
Reputation Power: 0
I am writing a shell script that executes an sql query in a block.
After execution the values are assigned to local variables with in the block.
Now, I wanted to assign these local variables to Global variables.
sum(case when b.product_license_id = 20 then 1 else 0 end) INTO MONTHLY_500_PLUS,
sum(case when b.product_license_id = 21 then 1 else 0 end) INTO ANNUAL_500_PLUS,
sum(case when b.product_license_id in(20,21) then 1 else 0 end) INTO TOTAL_PlusActive
from tb_sub_option a
Now I will get some values into MONTHLY_500_PLUS,ANNUAL_500_PLUS,TOTAL_PlusActive
Now I wanted to assign these values to some GLOBAL variables.
Is it possible