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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Switching between Database....

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-09-18 : 22:19:27
Niraj writes "Hi,
I am writing a store Proc which need to switch between two DB to get information.. I tried using USE {databse}, but i guess this does not work with store procs and triggers...

Is there any other way i can switch between Db in one Store proc..

the secnario is like this...
There is one DB which has all user information and
Other DB is used to store Live as well as archive Poll/Survey/Quiz results...

Poll/Survey/Quiz results database generates the results table on the fly on first hit to web site..

Now my problem is, I need to generate a txt file of this user inputs to pass it on to 3rd party..

Since user info is required as part of the txt i need to write a SP which can toggle between Two DB.
First of all the SP get gett all info from respective Poll/Survey table and then using userID from output it needs to get user info from other DB...

Thanks in Adv...
Niraj"

   

- Advertisement -