Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Vack
Aged Yak Warrior
530 Posts |
Posted - 2011-10-25 : 12:30:00
|
| I want to select records where a field is null or not equal to 'TOP' or not equal to 'BOTTOM'.This field can have other values like 'LEFT','RIGHT'....When I doselect *from tablewhere field is null or field <> 'TOP' or field <> 'BOTTOM' It is still returning records where field is equal 'TOP' and 'BOTTOM'Is there another way I need to be doing this? |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-10-25 : 12:31:05
|
| Try:select *from tablewhere field is null or field NOT IN ('TOP','BOTTOM') |
 |
|
|
|
|
|