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 - 2002-03-11 : 21:31:34
|
| Tat writes "Hello Gurus!I created a job to run every so minutes in SQL 7. Part of the script for this job is:use TGUsersSELECT @ActiveRegisteredUsers = count(UserId) From Users Where IsDisabled = 0 and UserEmail <> N'all'use TGDEVDBSELECT @UsersCurrentlyOnline = count(UserID) FROM Subscribers WHERE (RTRIM(status) <> 'f') AND (DATEDIFF(second, [Time], GETDATE()) < 31)It works fine. However, I have a problem regarding database names. For example, some of my users can have one database with set of tables (for example 'TGDEVDB') and some users may divided all that tables to two database, as in the example above - 'TGUsers' and 'TGDEVDB'. Is there any way to store somewhere that names on the system during installation and get it when I run the job on SQL7, so it wouldn't be hard coded?" |
|
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2002-03-11 : 21:49:51
|
| this might be useful[url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=13746[/url]--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
 |
|
|
|
|
|