Question : cross database view or something in SQL Serve?

I have several similar databases (for example, IT dept employee list, HR employeeList, etc.). What is the best practice to create a view for cross database join or query? Any link on this topic? Thanks.

Answer : cross database view or something in SQL Serve?

If the databases are on the same server you can simply join by prefixing the database name at the beginning such as this example using northwind and pubs
use northwind
go
select a.customerid, a.companyname,b.city
from customers a
inner join pubs.dbo.stores b
on a.city = b.city

Here are associated urls:
1) http://groups.google.com/group/microsoft.public.sqlserver.programming/browse_thread/thread/7e79d2f07a5aafc8/80afcd11b7401e8d?hl=en&lnk=st&q=datbases+join+group%3A*sqlserver*#80afcd11b7401e8d

2) http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=6086

3) http://www.issociate.de/board/post/297358/Joining_tables_in_different_databases.html

If the databases are on different servers you'll need to create a linked server. Let me know if this is your situation and more detail will be provided.
Random Solutions  
 
programming4us programming4us