Aug 15, 2005 #1 lotharious MIS Jan 20, 2005 180 US Cant get the syntax quite right update joblist set subdate = select sdate from invoice where job=10
Aug 15, 2005 #2 PHV MIS Nov 8, 2002 53,708 FR UPDATE joblist SET subdate = (SELECT sdate FROM invoice WHERE job=10) WHERE some condition(s) on joblist's fields I guess this should work: UPDATE joblist INNER JOIN invoice ON joblist.job = invoice.job SET joblist.subdate = invoice.sdate WHERE joblist.job = 10 Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
UPDATE joblist SET subdate = (SELECT sdate FROM invoice WHERE job=10) WHERE some condition(s) on joblist's fields I guess this should work: UPDATE joblist INNER JOIN invoice ON joblist.job = invoice.job SET joblist.subdate = invoice.sdate WHERE joblist.job = 10 Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Aug 15, 2005 Thread starter #3 lotharious MIS Jan 20, 2005 180 US Oh one of great stupidity *points at self* Add ()'s and things work nicely... Upvote 0 Downvote