June 1, 2006 at 6:15 pm
I am having problems selecting data from multiple Sql Server databases on the same server. Since you do not have synonyms what do you use to select data from a different database on the same server.
Thanks, that worked.
June 1, 2006 at 6:20 pm
<database>.<owner/schema>.<table>,
e.g. select * from newdatabase.dbo.table1
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 2, 2006 at 4:45 am
Watch out for "odd" table / database names e.g. we name our databases by year e.g. 2005, 2004, 2006 which means you need to put brackets round them.
In general, if in doubt use barckets. Checl bol for Delimited Identifiers.
June 2, 2006 at 10:13 am
Agreed. Applies to all other identifiers as well as table and column names.
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply