I have a script that read some values from tables to variable at runtime.How
can i get this values directly
or how can i declare global variables.
Fo example :
Declare @SQLStr varchar(500),
@IntVal Int,
@Table Varchasr(50)
Set @Table='Northwind.employee'
Set @SQLStr='Select @IntVal=ID from ' + @Table
Exec(@SQL)
>> Stay informed about: Setting variable