chainedtodesk
Programmer
i have a main table and i need to verify that a field is the correct number in column1, so i tried an update query with the following code but it returns an error that "Result of SELECT more than one row." but in the combination of field2 and field3 wont have dups but i could have 10 or more records from the query that need to be updated.
UPDATE test A1
SET A1.column1= (SELECT B1.field1
FROM mycheck B1,
test C1
WHERE B1.field2 = C1.field2 and
B1.field3 = C1.field3)
i tried to add a where exists but it returned same issue. can this be done?? or can i not update multiple records like this?
UPDATE test A1
SET A1.column1= (SELECT B1.field1
FROM mycheck B1,
test C1
WHERE B1.field2 = C1.field2 and
B1.field3 = C1.field3)
WHERE EXISTS (SELECT B1.field2 , B1.field3
FROM mycheck B1,
test C1
WHERE B1.field2 = C1.field2 and
B1.field3 = C1.field3)
UPDATE test A1
SET A1.column1= (SELECT B1.field1
FROM mycheck B1,
test C1
WHERE B1.field2 = C1.field2 and
B1.field3 = C1.field3)
i tried to add a where exists but it returned same issue. can this be done?? or can i not update multiple records like this?
UPDATE test A1
SET A1.column1= (SELECT B1.field1
FROM mycheck B1,
test C1
WHERE B1.field2 = C1.field2 and
B1.field3 = C1.field3)
WHERE EXISTS (SELECT B1.field2 , B1.field3
FROM mycheck B1,
test C1
WHERE B1.field2 = C1.field2 and
B1.field3 = C1.field3)