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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

weird error (databse doesn't exist)

Status
Not open for further replies.

rravenn

Programmer
Jul 6, 2004
40
US
Here's a query that is part of some complex query with unions.

Code:
			SELECT Email,'Mng' as Role
			FROM resManager
				INNER JOIN d10task.dbo.UserGroups ug ON resManager.GroupID = ug.GroupID 
				INNER JOIN resRequestResource ON resRequestResource.RequestID = @RequestID
				INNEr JOIN resResource ON resRequestResource.ResourceID = resResource.ResourceID [highlight]/*here*/[/highlight]
				INNER JOIN D10Task.dbo.Users Users ON ug.UserID = Users.UserID
			WHERE resManager.ActionID = 1 [highlight]AND (resResource.CatID = resManager.CatID
					OR  (Inherit = 1 AND dbo.resCatIsDescendant(resManager.CatId,resResource.CatID) = 1))[/highlight]

It works normally the way it is written; however, when I move the highlighted code to join (highlighted place), I start getting the error about Dtabase id 112 being wrong cause it's not activated or is in transition.

Why is that?
 
would you mind asking your question in the appropriate forum for whatever database system you are using

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top