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 |
|
dave0109
Starting Member
3 Posts |
Posted - 2011-09-21 : 12:15:08
|
| I need to join two databases on separate servers based on phone number fields.I have a call management system and a CRM system that aren't linked.My aim is to link the phone number in the two databases so that I can see company names, relationship type etc from the crm system.Two problems are:Inner join and formating the CRM Phone Number field i.e. removing white spaces.Any ideas? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-21 : 12:27:21
|
you need to add linked server to one of system in another and then use four part naming to access the tablefor ex:USE [CRMDB]SELECT required columns...FROM table tJOIN [CMS]..dbo.table t1ON t1.phonenumber = t.phonenumber I've given indicative db names so please replace them with actual names------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
dave0109
Starting Member
3 Posts |
Posted - 2011-09-21 : 12:31:28
|
| Great, thanks for this I'll give it a go. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|