Avatar of mmexchange
mmexchange asked on

Select table data from a different SQL instance?

I have a production SQL instance "Host1\SQL1" and a testing SQL instance "Host1\SQL2". I've trying to copy data from the Production SQL instance to the testing SQL instance, like this:
(but it isn't working) What as I missing?
(running SQL from "Host1\SQL2")
UPDATE    PageTemplates
SET              TemplateText =
                          (SELECT     PT1.TemplateText
                            FROM          [Host1\SQL1].MyDB.PageTemplates AS PT1
                            WHERE      (PT1.TemplateID = 1))
WHERE     (TemplateID = 1)
Microsoft SQL ServerMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
chapmandew

8/22/2022 - Mon
slam69

why not use the impirt export tool within the server studio if its a direct copy from one to another
slam69

import*
ASKER
mmexchange

Just need a single row...
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
Brendt Hess

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.