Thursday, March 22, 2012

Changing the current database inside a stored procedure

Hi all,

I need to change the current database from within a stored procedure or something that can be called by a stored procedure. I know the use statement is ineffective in these circumstances. Just need to know if there's a method out there I can employ.

Any help would be really appreciated.

Richyou don't need to change DBs while in a stored procedure just reference the object(s) using the three part object name: <DATABASE>.<OWNER>.<OBJECT NAME>.|||Thanks Paul...one of those times when you miss the blind obvious.

Cheers

Rich

No comments:

Post a Comment