marti
asked on
How to Declare a global variable in SQL Server
How can I declare a global variable in SQL Server?
I want this varaiable to be visible across multiple stored procedures.
I want this varaiable to be visible across multiple stored procedures.
null
(oops... sorry, didn't mean to post.)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
gpbuenrostro, could you please refer to a source which would clarify this article?
“Global variables are predefined and maintained by the system”.
The only way to resolve this problem is creating a table in which you must store the values of all your “global” variables and use a stored procedure to get the values from this table whenever you need them.
To get more detail see:
-"variables" definition on Glossary of BOL.
-Question 10198058 on EE:
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=10198058
The only way to resolve this problem is creating a table in which you must store the values of all your “global” variables and use a stored procedure to get the values from this table whenever you need them.
To get more detail see:
-"variables" definition on Glossary of BOL.
-Question 10198058 on EE:
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=10198058
ASKER
Thank you.