Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
I am trying to link 2 tables from 2 databases in a query.m2mdata01.dbo.somastCustomizations.dbo.somodsIf I'm not allowed to use something like:m2mdata01.dbo.somast.fsono how would I perform the following statement?
select somods.*, dbo.somast.fcompany from somodsinner join m2mdata01.dbo.somast on dbo.soMods.[fsono] = dbo.somast.fsono
I guess I just don't understand the whole ownership thing.
spirit1
Cybernetic Yak Master
11752 Posts
Posted - 2008-09-23 : 17:36:55
you have to reference tables like:dbname.ownerName.TableNameso select ...from dbname1.dbo.TableName1 t1 join dbname2.dbo.TableName2 t2 on t1.id = t2.id_______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!