General discussion

Locked

Global Variables in SQL Server

By raakeshpatel ·
How can I assign a global Variable to variable in a sql server stored procedure?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Global Variables in SQL Server

by roc180 In reply to Global Variables in SQL S ...

When you say global, do you mean global to an an application? If so just pass in the global variable as a parameter to the stored procedure, granted the stored procedure has to be written to take a parameter. If you need a code reference on how to do this let me know and I can provide a few ADO examples of passing parameters to a stored prodedures.

Neal Martinelli

Collapse -

Global Variables in SQL Server

by raakeshpatel In reply to Global Variables in SQL S ...

The question was auto-closed by TechRepublic

Collapse -

Global Variables in SQL Server

by pVp In reply to Global Variables in SQL S ...

An example that's even useful!

declare @rowct int, @errno int
select @rowct = @@rowcount
select @errno = @@error

Collapse -

Global Variables in SQL Server

by raakeshpatel In reply to Global Variables in SQL S ...

The question was auto-closed by TechRepublic

Collapse -

Global Variables in SQL Server

by raakeshpatel In reply to Global Variables in SQL S ...

This question was auto closed due to inactivity

Back to Networks Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums