Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ovince
Starting Member
32 Posts |
Posted - 2006-11-09 : 05:11:45
|
hi All, This is a first time to meet this kind of problem and I would like to consult more experienced forumersI have 2 databases (db1 and db2). I would like to extract some data from db1 View named 'viw' AND db2 Table named 'tab' using some filtering. So I wrote this:select s.data1, m.data2from db1.viw s, db2.tab mwhere s.data1=m.data1 s.data2=m.data2 s.data3=m.data3It does not work. What I do wrong?Thank you Oliver |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-09 : 05:14:01
|
SELECT s.data1, m.data2FROM db1..viw s inner join db2..tab m on s.data1 = m.data1 and s.data2 = m.data2 and s.data3 = m.data3Peter LarssonHelsingborg, Sweden |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-09 : 05:18:00
|
It would have been nice if you also provided the error messages "Invalid object name 'db1.viw'" and "Invalid object name 'db2.tab'"Peter LarssonHelsingborg, Sweden |
 |
|
ovince
Starting Member
32 Posts |
Posted - 2006-11-09 : 05:26:00
|
Peter,this was very fast reply really :) as last time as I remember. you are very kindthanks oliver |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-09 : 05:41:19
|
Ketö sör!Peter LarssonHelsingborg, Sweden |
 |
|
ovince
Starting Member
32 Posts |
Posted - 2006-11-09 : 06:14:15
|
:) Its ok by me |
 |
|
|
|
|