variables prefixed with @@ are global variables Also refer these http://www.sommarskog.se/error-handling-I.html http://www.sommarskog.se/error-handling-II.html Madhivanan Failing to plan is Planning to fail
I have a doubt... I created a variable @@variable1 and assigned some value in a SP (say proc1). i called proc1 from some other sp (say proc2), and used that variable @@variable1 in proc2 with out declaring it and it throwed an error saying, the @@variable1 is not declared. what is exact use of allowing a declaration like that if i cannot use it from outside? Thanks, Ram "It is easy to write code for a spec and walk in water, provided, both are freezed..."
IIRC, something og that is explained here:http://www.sommarskog.se/share_data.html -- Frank Kalis Microsoft SQL Server MVP http://www.insidesql.de Heute schon gebloggt?http://www.insidesql.de/blogs