Problem updating remote table using linked server and 4 part naming

  • 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

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply