Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2001
    Posts
    3

    Unanswered: 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.

    Rich

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    you 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>.
    Paul Young
    (Knowledge is power! Get some!)

  3. #3
    Join Date
    Oct 2001
    Posts
    3
    Thanks Paul....one of those times when you miss the blind obvious.

    Cheers

    Rich

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •