Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update query 1

Status
Not open for further replies.

Lost500

IS-IT--Management
Mar 10, 2009
110
US
Hi all,
I am trying to update a field in a table to just have a value of zero. i try using the code:
UPDATE tablename SET tablename.fieldname = 0;
and it seems very straight forward but returs the error 'Single-row update/delete affected more than one row of a linked table. Unique index contains duplicate values.' now the table is linked to an odbc database on a sql server i have no idea how that's affecting that and the table allows for duplicate values. any help is greatly apreciated! thanks in advance!
 
So you are trying to change every record in the linked table so that this field is zero....the error message indicates that there is an index on that particular field that states there should be no duplicate values and when you try to change all the records to have a zero you are breaking that rule....you'll need to get with the database administrator to determine what the index is on the table that is disallowing your update.

HTH

Leslie

Have you met Hardy Heron?
 
Thanks lespaul. Unfortunately I am the database admin. and i cannot find any indexes prohibiting me from doing so. so... anyone out there who might know what else could cause this problem???? I think it has something to do with the link to the sql database. any ideas? thanks for any help in advance.
 
You may try a PassThru query.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top