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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-01-11 : 08:43:10
|
| padma writes "I have 2 databases .I created one grid report in VB.The report i created has the fields of a database named bilzdb.But I want to add the field of a table which is in another data base named bilzdb2 to that report.What is the query forthatsorry i made one mistake in previous question" |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2005-01-11 : 11:53:29
|
| After setting up a connection to both databases (See Linked Servers in BOL), you can use the four part naming to reference the "other" table:Ex.select t1.Stuff, t2.Columnfrom ThisTable t1 join ThatServer.ThatData.ThatOwner.ThatTable t2 on t1.ThisKey = t2.ThatKeywhere blah, blah, blahHTH=================================================================Scriptures, n. The sacred books of our holy religion, as distinguished from the false and profane writings on which all other faiths are based.-Ambrose Bierce, writer (1842-1914) [The Devil's Dictionary] |
 |
|
|
|
|
|