I have a SQL that I can't get to work and I think I have the syntax incorrect. Here it is.
SELECT DISTINCT manufacturers.mfrid, manufacturers.mfrname FROM manufacturers, models, oemmemory, crossref, pdppart, exclude WHERE manufacturers.mfrid = models.mfrid AND models.modelid = oemmemory.modelid AND crossref.crossrefid = oemmemory.crossrefid AND crossref.crossrefid = pdppart.crossrefid AND models.modelid not in(select exclude.modelid from exclude) AND models.catid = ? ORDER BY manufacturers.mfrname;
Basically it tells me I have an error near the select exclude.modelid from exclude.
What I'm trying to do is to get a list of models but not ones that are listed in the exclude table.
where models.catid = 937
and exclude.modelid is null