Hi All,
I'm trying to update two columns (f13, f14) table based on a select statement. If I run the select statement on its own I get the desired results. Now I need to update those records. I get this error message when trying to run the code below. "You have written a subquery that can return more than one field without using the exists reserved word in the main query's FROM clause.Revise the SELECT statement of the subquery to request only one filed.". Should I be taking a different approach? Please feel free to comment. Thanks in advance!
Code:
UPDATE edi_out SET f13='Yes' AND f14='same day duplicate'
WHERE
(SELECT * FROM edi_out A
LEFT JOIN edi_out_new_data_distinct B ON A.f10=B.ctrl_num AND A.f3=B.f3 AND A.f6=B.f6
WHERE B.ctrl_num IS NULL);
-Chris