Where Not In Insert
OK I think I'm having a moment of madness, I cannot figure out why this Insert Into Where Not In is not working, there are records in the tbl_distributor_isa table that are not in the tbl_catergory table but its not seeing them? What am I doing wrong?
INSERT INTO tbl_catergory
(tbl_catergory.scat1, tbl_catergory.scat1_desc, tbl_catergory.scat2, tbl_catergory.scat2_desc, tbl_catergory.distributor)
SELECT [Item Class], [Item Class Desc], [Product Type], [Product Type Desc], distributor
FROM tbl_distributor_isa
WHERE [Item Class] NOT IN
(SELECT scat1
FROM tbl_catergory) AND[ Product Type]NOT IN
(SELECT scat2
FROM tbl_catergory)
Any help gratefully received.
Stuart
|