PeterBaileyUk
asked on
access delete query
I have this query
I would like to delete the rows in AbiToMvris_NEW_ table where the AbiToMvris_NEW_ .[MVRIS CODE] is not in the SMMT table.
always get stumped on these
I want to do this in vba
SELECT AbiToMvris_NEW_.[MVRIS CODE], SMMT.[MVRIS CODE]
FROM AbiToMvris_NEW_ LEFT JOIN SMMT ON AbiToMvris_NEW_.[MVRIS CODE] = SMMT.[MVRIS CODE]
WHERE (((SMMT.[MVRIS CODE]) Is Null));
I would like to delete the rows in AbiToMvris_NEW_ table where the AbiToMvris_NEW_ .[MVRIS CODE] is not in the SMMT table.
always get stumped on these
I want to do this in vba
Try this
Delete A
FROM AbiToMvris_NEW_ A LEFT JOIN SMMT B ON A.AbiToMvris_NEW_.[MVRIS CODE] = B.SMMT.[MVRIS CODE]
WHERE (((A.SMMT.[MVRIS CODE]) Is Null));
Delete A
FROM AbiToMvris_NEW_ A LEFT JOIN SMMT B ON A.AbiToMvris_NEW_.[MVRIS CODE] = B.SMMT.[MVRIS CODE]
WHERE (((A.SMMT.[MVRIS CODE]) Is Null));
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
pls try
Open in new window
Be sure to make a backup first
Regards