5 pts.
 SQL Statement to update a table with set conditions on another table
Hi, Can anyone help me? I am trying to update a second table with criteria in its own and another table being set. This is what I have come up with and various others. It should give an idea of what I am trying to do. UPDATE Clientextradetails LEFT JOIN Clients ON Clients.ClientRef = ClientExtraDetails.ClientRef SET ClientExtraDetails.UserDefinedKey1 = 'bro' WHERE Clients.ClientType = 70 AND ClientExtraDetails.UserDefinedKey1 is NULL Any help would be great.

Software/Hardware used:
ASKED: January 29, 2009  3:21 PM
UPDATED: January 29, 2009  7:06 PM

Answer Wiki:
You will want to use something like this. <pre> update Clientextradetails SET ClientExtraDetails.UserDefinedKey1 = 'bro' FROM Clients WHERE Clients.ClientRef = ClientExtraDetails.ClientRef AND Clients.ClientType = 70 AND ClientExtraDetails.UserDefinedKey1 is NULL</pre>
Last Wiki Answer Submitted:  January 29, 2009  7:06 pm  by  Denny Cherry   64,505 pts.
All Answer Wiki Contributors:  Denny Cherry   64,505 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _