example1=
select pubs.dbo.employee.hire_date, northwind.dbo.employees.hiredate from
pubs.dbo.employee
cross join northwind.dbo.employees
or
select pubs.dbo.employee.hire_date, northwind.dbo.employees.hiredate from
pubs.dbo.employee
left join northwind.dbo.employees
on pubs.dbo.employee.hire_date = northwind.dbo.employees.hiredate
example2 =
same as above, linked server configured. just prefix the databasename with
the linked server name ie.
serverA.pubs.dbo.employee.hire_date
cheers
paul
-----Original Message-----
From: Nirmal C.Kumar [mailto:[Email Address Removed] 30 January 2003 13:36
To: LazyDBA.com Discussion
Subject: query between 2 servers/databse
List
Can you help me to figure out how to go in writing a query a select or a
insert combining 2 tables from more than 1 database .What's the syntax .
For example :
1. I need to write a select for a table joining a table from a pubs and
northwind .
2. How can I combine a single query from 2 database server .
Nirmal
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page