473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Update Table Query from one server to another

Hi,

I have two servers like A and B. Both A and B have same table.Now i want to update the table from A server with table from B server data. IS it possible??
Jun 18 '13 #1
5 10496
ck9663
2,878 Expert 2GB
Yes it's possible.

You can either create a code or do a replication.

Good Luck!!!


~~ CK
Jun 18 '13 #2
Maraj
24
you can write a query like this
I am supposing you are running this on Server A.
Expand|Select|Wrap|Line Numbers
  1. begin tran
  2. update Table 
  3. set column=somevalue
  4. where value=(select value from serverB.DataBasename.dbo.table where value=somevalue)
This will update value from Server B to Server A
Jun 20 '13 #3
Rabbit
12,516 Expert Mod 8TB
That will only work is the server is set up as a linked server and only if you have the permissions to. At our work, we are not allowed to do this.
Jun 21 '13 #4
ck9663
2,878 Expert 2GB
And be careful with that syntax, that's an RBAR.

Good Luck!!!


~~ CK
Jun 21 '13 #5
Hi
Use this Query,


Expand|Select|Wrap|Line Numbers
  1. UPDATE SERVER1TABLE SET SERVER1TABLE.COLUMN1=B.COLUMN1,SERVER1TABLE.COLUMN2=B.COLUMN2
  2. FROM OPENDATASOURCE('SQLNCLI','DATA SOURCE=SECONDSERVERNAME;UID=XXXX;PWD=XXXXX').DATABASENAME.DBO.SERVER2TABLE AS B
  3. WHERE B.COLUMN1='XXXX' AND HRMS10EMPLOYEE.COLUMN1='XXXX'

Regards,
Sri Ganesh
Jun 25 '13 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: David Shorthouse | last post by:
Hello folks, I have a problem with an update query on an asp not updating the table in an Access db. The code runs, I have no errors, but when I examine the table, nothing was updated. The query...
3
by: Bill Clark | last post by:
I have about 20,000 records pulled from Excel that I need to update. What I need to do is run an update query that bascially says: If a field is null, update it with the previous record value of...
5
by: Don Seckler | last post by:
I have an update query that runs when a report closes. I have several reports that will need to run the update query with diferent criteria. I'd like to simply make the criteria change in the...
10
by: Randy Harris | last post by:
I imported records into a table, later found out that many of them had trailing spaces in one of the fields. If I'd caught it sooner, I could have trimmed the spaces before the import. This...
5
by: Andrew | last post by:
I've got a list box that selects a record on a subform, and in that subform are a few text fiels and a button that runs an update query. How do I have the update query button run and only update...
4
by: deko | last post by:
I'm trying to update the address record of an existing record in my mdb with values from another existing record in the same table. In pseudo code it might look like this: UPDATE tblAddress SET...
7
by: Mark Carlyle via AccessMonster.com | last post by:
I have this update query that I am trying to run. I know the syntax is messed up but do not know how to correct it. Select 'UPDATE', Transactions,'Set = where = ' From "Get Daily Balances" ...
2
by: bobabooey2k | last post by:
I have an update query with one field having in its "Update to" cell a DLookup statement. This query takes 2-3 minutes on 3000 records. Can I avoid dlookup here using multiple queries? An...
5
by: colleen1980 | last post by:
Hi: In my table there is a field of type checkbox. I create a button on my form and wants to deselect all the checkboxes in that field (PrintQueue). Table: Research_New PrintQueue Format Yes/No...
1
by: giovannino | last post by:
Dear all, I did a query which update a sequence number (column NR_SEQUENZA) in a table using a nice code (from Trevor !). 1) Given that I'm not a programmer I can't understand why...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.