Microsoft
Software
Hardware
Network
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/g
roup/
micro
soft.publi
c.sqlserve
r.programm
ing/browse
_thread/th
read/
7e79d
2f07a5aafc
8/80afcd11
b7401e8d?h
l=en&lnk=s
t&q=datbas
es+
join+gr
oup%3A*sql
server*#80
afcd11b740
1e8d
2)
http://www.sqlteam.com/for
ums/topic.
asp?TOPIC_
ID=6086
3)
http://www.issociate.de/bo
ard/post/2
97358/
Join
ing_tables
_in_differ
ent_databa
ses.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
Active Directory Startup script
Have full control in Sharepoint but cannot view groiup
There is insufficient system memory in resource pool 'internal' to run this query. WE upgraded from a 32 bit, 4 GB, Windows 2003 server, SQL server 2005 machine to a 64 bit, 2 processor quad core, 8
Excel Macro to Compare Cells and Edit the Workbook
.NET CF Performance counters are missing
"Data type mismatch in criteria expression." when comparing dates
WINDOWS SERVER 2008 BACKUP
SQL Syntax
Need SQL Syntax help to make my qry more efficient.
STOP: 0x0000007E (0xC0000420, xxxxxx) acpi.sys - address 83AB9717