SQL noob here. I'm using MS Access to query a table of streetlight data to exclude lights of a certain size and only where the fixture type is a variant of "Cobra". Is anyone kind enough to give me some guidance on what I might be doing wrong?

I can produce the lights I need to be excluded with:

```
SELECT * 
FROM Lighting 
WHERE Lighting.TYPE_FIXTURE LIKE '*cobra*' 
AND Lighting.SIZ < '16'

```

Simple enough. I thought this would be easy to tweak a little bit to get it to exclude these instead of produce them.

```
SELECT * 
FROM Lighting
WHERE Lighting.TYPE_FIXTURE NOT IN ('*Cobra*') 
AND Lighting.SIZ NOT IN ('10', '15')

```

This code excludes the lights I need to be excluded, but also every other type of light that is 100 or 150w. For the life of me, I can't figure out how to exclude ONLY Cobra lights 150w or less.

Through extensive internet research, I tried using an IIF expression to produce a temporary column that would have a value of 0 or 1, depending on if it needed to be excluded or not, 

```
SELECT *
    ,IIf(Lighting.TYPE_FIXTURE LIKE "*cobra*" AND Lighting.SIZ < 15, 0, 1) AS IncludeFlag
INTO #MyTempTable
FROM Lighting

SELECT *
FROM #MyTempTable
WHERE IncludeFlag = 1

```

but my only result is an error message that I don't know how to resolve. I've spent all day on this one query and I'm starting to pull my hair out!!