November 28, 2007 at 3:39 pm
I need to do a comparisson of retailer chain and store records in two different databases on different servers. I could easily create the needed SQL if I were comparing data from two different databases on the same server but have never done it across multiple servers before. What do I need in my SQL to select data from a different server?
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -- Martin Fowler
November 28, 2007 at 4:31 pm
If you plan on doing this a lot - you should look at setting up a linked Server. That will allow you to access the data from a remote server on the local server.
Otherwise - take a look-see into the syntax for OPENQUERY, OPENDATASOURCE, or OPENROWSET. They should point you in the right direction.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
November 28, 2007 at 4:37 pm
Thanks Matt!
Love your take on the "lack of planning - emergency" quote!
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -- Martin Fowler
November 28, 2007 at 4:41 pm
Thanks! - when all of your end-users are doctors (who think of themselves as royalty), then you tend to have to play fireman a lot....:P
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply