Link to home
Start Free TrialLog in
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)
Avatar of slam69
slam69
Flag of United Kingdom of Great Britain and Northern Ireland image

why not use the impirt export tool within the server studio if its a direct copy from one to another
import*
Avatar of mmexchange
mmexchange

ASKER

Just need a single row...
ASKER CERTIFIED SOLUTION
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial