Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to reference user login in stored proc

Status
Not open for further replies.

vbrunner

Programmer
Apr 17, 2002
16
0
0
CA
I have a stored proc that accesses another SQL database thus: " + @sDatabase + ".dbo.tablenamehere. This works fine for most cases but when I try to use this with a join from an empty table, SQL requires that I provide the database name. I need to work around this because the stored proc is kept in source safe to be applied to 3 different databases (development, testing, production).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top