Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

working with 2 databases

Status
Not open for further replies.

121278

Programmer
Aug 6, 2001
35
0
0
AT
can anyone tell me how i can solve this problem?

i connect to a database, make a select from a table in this db and a view which points to table in another db,
which is not workin
(i guess because i didn't connect to the 2nd db)
selecting things just from one db works

how can i solve this problem?
stored procedures didn't help

thanx for answers in advance
ca
 
are the databases on the same server?

if so, to reference different tables in different databases you need to fully qualify the name.

this question will better be answered in the SQL Server forum, but if I recall right, I think you fully qualify the tables as such:

DatabaseName..tableName

where the .. defaults you to DBO... I could be wrong though...

hth
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top