Showing posts with label querying. Show all posts
Showing posts with label querying. Show all posts

Monday, March 12, 2012

Need Advice/Help on querying a different db

I have 2 different database's on the same server. I'm trying to create a stored proc that resides in Reporting database but queries against the Call database. 4 part naming convention gives me an error of 'invalid object name' What am I forgetting here?My first guess would be that you forgot how to spell the object name. The next guess would be that you are doing something that doesn't make sense, like SELECT * FROM myStoredProcedure or the equivalent.

-PatP|||stored procedure lies in ABC4_Dev1_Reporting
Data resides in ABC_Dev1_Call1

From Reporting db in query analyzer I cannot get the following query to run

select * from dbo.ABC_Dev1_Call1.Call (Call is the table)

What am I missing?
Thanks in advance!|||Ah, a snippet of code is worth a thousand words of description! I'd use:SELECT *
FROM ABC_Dev1_Call1.dbo.Call-PatP|||Ah... very interesting... I'm claiming a bad case of the friday's on that one. I owe you one. Thanks a million. Have a good weekend.|||Listen...if Pat collected them all...he'd be hammered all year...

You threw me with the 4 part naming convention....

See what happens when I take a break and get a sandwich...