1 UPDATE car_pur INNER JOIN car_pur_a ON car_pur.CarId=car_pur_a.CarId SET Status='1' WHERE Status<>'81' 11 UPDATE car_pur INNER JOIN car_pur_a ON car_pur.CarId=car_pur_a.CarId SET Status='11' WHERE Status<>'81' AND EstDat<>'' 21 UPDATE car_pur INNER JOIN car_pur_a ON car_pur.CarId=car_pur_a.CarId SET Status='21' WHERE Status<>'81' AND ArrDat<>'' 31 UPDATE car_pur INNER JOIN car_pur_a ON car_pur.CarId=car_pur_a.CarId SET Status='31' WHERE Status<>'81' AND RdmDat<>'' 41 UPDATE car_pur INNER JOIN car_pur_a ON car_pur.CarId=car_pur_a.CarId SET Status='41' WHERE Status<>'81' AND InDat<>'' SELECT * FROM car_pur INNER JOIN car_pur_a ON car_pur.CarId=car_pur_a.CarId WHERE EstDat<>'' AND Status<>'81' Error SELECT * FROM car_pur INNER JOIN car_pur_a ON car_pur.CarId=car_pur_a.CarId WHERE DeliDat='' AND InDat='' AND Status='41' SELECT * FROM car_pur INNER JOIN car_pur_a ON car_pur.CarId=car_pur_a.CarId WHERE DeliDat='' AND InDat='' AND RdmDat='' AND Status='31' SELECT * FROM car_pur INNER JOIN car_pur_a ON car_pur.CarId=car_pur_a.CarId WHERE DeliDat='' AND InDat='' AND RdmDat='' AND ArrDat='' AND Status='21' SELECT * FROM car_pur INNER JOIN car_pur_a ON car_pur.CarId=car_pur_a.CarId WHERE DeliDat='' AND InDat='' AND Status='81' 鎔德 28台已交車,無到車,交車日期 53台已到港車,無實際到港,投單,到車,交車日期 21份5月合約 依德 5台已到車未交車,無到車,交車日期 1台已到港車,無到車,交車,投單,實際到港日期 51份5月合約 update `car_pur_a` set platedat='102.03.22' WHERE carid='444' update `car_pur_a` set platedat='102.03.27' WHERE carid='443' update `car_pur_a` set platedat='102.03.05' WHERE carid='440' update `car_pur_a` set platedat='102.03.15' WHERE carid='439'