Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-09-26 : 07:57:33
|
| AALi writes "Hi,I came form oracle background.In oracle we define global variable package which we can set.As we move our application to SQL server I was wondering if we can do the same.our application in java call oracle databaseset global package variables by call <packagename>.functionthis function set global variable by 'execute <packagename>.function' then in our java program we call this for each variable to get the value set'declare x varchar2(1000); begin x := <packagename>.variablename; end;'So as I see no package concept in SQL server . I am thinking for using stored procedure by how can I get variable set. If I can have snipped code for that it will be great.Thanks in advance for your help.Thanks,AAli " |
|
|
gpl
Posting Yak Master
195 Posts |
Posted - 2005-09-27 : 09:11:46
|
| What sort of variables are you setting ??I suspect that you would be wanting to pass your variables into the parameters of the stored procedures that you call.Otherwise you could store the variables in rows of a configuration table.If they are more of a constant in nature, you could create user-defined functions to return the values to wish.Graham |
 |
|
|
|
|
|