Hello -
I'm trying to create a new database, then create the necessary stored procedures inside the new database.
I am able to get it to work in Query Analyzer, but I want to be able to convert it into a stored procedure. My problem is that I don't know how I can switch control over to the new database. I tried using (USE DbName) but that gives me errors inside the SP. Any ideas or suggestions?
I'm relatively new at SQL Server, so any advice you could give me would be greatly appreciated.
Thanks in advance,
leo
I'm trying to create a new database, then create the necessary stored procedures inside the new database.
I am able to get it to work in Query Analyzer, but I want to be able to convert it into a stored procedure. My problem is that I don't know how I can switch control over to the new database. I tried using (USE DbName) but that gives me errors inside the SP. Any ideas or suggestions?
I'm relatively new at SQL Server, so any advice you could give me would be greatly appreciated.
Thanks in advance,
leo