Yes, you direct output from one select statement into an update statement. Any SQL book will show you how.
Update CustMast set ( Phone, Fax ) = (select Phone, Fax from CustTrans where CustTrans.CustKey = CustMast.CustKey) Where exists (select * from CustTrans where CustTrans.CustKey = CustMast.CustKey)You need the "where exists" because otherwise, if no match is found, the system would try to put null values into Phone and Fax and in this case, they don't allow null values. Chris
Comment