Posted by plmanikandan on 01/10/07 10:38
Hi,
I'm having two databases in the name of n1,n2 having same design
I want to query both the databases by giving the database name in query
Databases
N1
N2
Table(both database contains same table)
Detail
Table details
No -int
Name -varchar(10)
Now i want to check the detail table in both n1 and n2 using the select
query
For that I have written query it is not working
select * from N1.Detail
Select * from N2.Detail
The above query is not working in query analyser,I'm getting error as
"Invalid object name"
In query analyser the Northwind database is currently selected, anyway
I have given the database name it has to query from N1 database. How to
use a select query with database name?
Mani
[Back to original message]
|