SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Problem updating remote table using linked server and 4 part naming


Problem updating remote table using linked server and 4 part naming

Author
Message
msearle
msearle
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 14
I have a linked server setup to an informix database. When I use 4 part naming to update an informix table, the wrong row is getting updated in a specific scenerio.

update ERP_TRNG.fms441.informix.csta_user_whse
set whse_code = '2323'
where csta_user_whse_id = 'gfdsa'

csta_user_whse_id is the primary key on the table and is defined as char(10).

If the row with the key 'gfdsa' is the last row in the table, the update statement will alter the first row in the table. If I use a key that is not the last row, then the update works fine.

If I run the above statement, the first row (the csta_user_whse_id value is '5') will be updated. If I then insert another row to the table:

INSERT INTO ERP_TRNG.fms441.informix.csta_user_whse
VALUES ('asdfg', '0500')

and then do my update on 'gfdsa', the correct row is updated.

If I didn't see it for myself, I'd think this is all just crazy talk.

Thanks
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search