I want to update my TableA on my ServerA by using linked server which is on serverB.I have successfully created the linked server but i am a little bit confused. Actually i have to update a columnA of TableA from the data coming from columnB(TableB) of linked server on the basis of the matched phoneNo in both of the tables. The confusion is that the phoneNo format coming from the linked server is in format "911234567891" and the phoneNo that are in my TableA is of format 123-456-7891. So i have to remove the 91 digit first then i have to convert this number into xxx-xxx-xxxx this format inorder to compare it with the column of TableA. I have written the following queries for changing the phone format and removing the 91 from start.
But I have no idea how I can can combine both of them in same query and then use it to update the data in TableA of serverA but the most frustrating thing is that I have to schedule this update after every 24 hours. Any kind of help/suggestion will be appreciated.