March 4, 2008 at 9:57 am
Need some help... the statement below works with in a database (lets say my localserver)
UPDATE Dev.dbo.table SET ControlNumber = T.ControlNumber
FROM Temp.dbo.temptable T
WHERE Dev.dbo.table.OperatorControlNumber = T.OperatorControlNumber
From my Localserver(Treat this as tempDB) i need to update the Controlnumbers to Development box.
UPDATE SERVER.Dev.dbo.table SET ControlNumber = T.ControlNumber
FROM SERVER.Temp.dbo.temptable T
WHERE SERVER.Dev.dbo.table.OperatorControlNumber = T.OperatorControlNumber
i get an error ...The number name 'SERVER.DEV.dbo.table' contains more than the maximum number of prefixes. The maximum is 3.
I understand the error ... is there another way of doing this?
Please help i need to run this ASAP ... Have a DEADLINE to meet.
Thank you
S.R
March 4, 2008 at 9:59 am
Do you have a linked server set up?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 4, 2008 at 11:28 am
How can you tell if a Server is Linked or Remote Server?
I think its Remote server but not sure
Thanks SR
March 4, 2008 at 11:42 am
I think i need to Create a linked database ..but dont know how to do it?
sr
March 4, 2008 at 11:46 am
Did you or someone else go through the process of setting up a linked server? Remote Servers are being phased out in favor of Linked Servers.
Which server are you writing the update statement on, your server or the development box? I would try writing the query this way, on my local box:
Update Dest
SET ControlNumber = T.ControlNumber
From
[remote_server].Dev.dbo.table as Dest Join
Temp.dbo.temptable as T On
Dest.OperatorControlNumber = T.OperatorControlNumber
You need to have the remote server setup to allow data access and allow RPC. Also the user setup for access to the remote server needs to have update rights on the destination table.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 4, 2008 at 11:47 am
sr (3/4/2008)
I think i need to Create a linked database ..but dont know how to do it?sr
Lookup linked server in Books On Line or google it.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 5, 2008 at 11:15 am
will have to run the script from my server (local box)
Update from my local box ( SSS) to Development box (RRR).
--
do you mean that if the servers are linked only then this update will take place?
--
Thanks 4 repl'n
March 5, 2008 at 11:48 am
Again, see Jack's posts (linked servers is probably your easiest solution). After an honest attempt, post any issues you may have and you'll find plenty of help.
-- You can't be late until you show up.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply