Hi all,
I have a query which purpose is to delete All records in table B which do not exist in Table A. The query look like this
Delete From tTempPOOutSpInst as A Where (A.ManuID and A.POOutNum) in
(Select R.ManuID, R.POOutNum from tTempPOinItems as L Right Outer Join tTempPOOutSpInst as R on L.ManuID = R.ManuID and L.POOutNum = R.POOutNum)
The ManuID and POOutNum is the primary key to check if records in tTempPOinItems and tTempPOOutSpInst are the same.
Can some one please point out what is wrong with my query?
Thanks.
I have a query which purpose is to delete All records in table B which do not exist in Table A. The query look like this
Delete From tTempPOOutSpInst as A Where (A.ManuID and A.POOutNum) in
(Select R.ManuID, R.POOutNum from tTempPOinItems as L Right Outer Join tTempPOOutSpInst as R on L.ManuID = R.ManuID and L.POOutNum = R.POOutNum)
The ManuID and POOutNum is the primary key to check if records in tTempPOinItems and tTempPOOutSpInst are the same.
Can some one please point out what is wrong with my query?
Thanks.