Hello Anoop,
you cannot use var1 for the second select too (if the structure of the tables are different). The SQLScript compiler determines the type of var1 during the first execution of the first select. The type of var1 is then fix for the whole procedure execution.
Regards,
Florian