February 17th, 2011, 01:44 PM
Assign Local variable values to Global variable
Hi Every body,
Can anyone show me how to assign a local variable value to a global variable....
February 17th, 2011, 03:04 PM
Do you have any intention of being more specific than that?
February 17th, 2011, 03:12 PM
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