Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating global variable?

Status
Not open for further replies.

sagn

Programmer
Jun 7, 2001
166
US
Hi,

How can I create a global variable?

I have several stored procedures that I would like
to share a few global (and will be static) variables?
I;ve tried declaring them using @@ but they are not
recognized once
the SP in which they where declared is exited.


Thanks

ds
 
No such animal in sql server. You might consider setting up a table (I usually call mine config or options) and setting those values in the table. You can then retrieve them using

select @myvariable = config.myvariable from config

 
Hmmmm. Drats!

OK That's easy enough. I suppose I'll do that.

Thanks

ds
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top