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 |
inbs
Aged Yak Warrior
860 Posts |
Posted - 2013-03-11 : 16:11:06
|
i have a lot of rows and i want to choose just whereA_TYPE<>'P' AND W_TYPE<>'F' OR A_TYPE<>'B'# A_TYPE W_TYPE1 P F2 B F3 P A4 B K i need to get just row 3,what is the condition i where clause? |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2013-03-11 : 16:41:23
|
When you combine ANDs and ORs you need to use parentheses in the appropriate spots.perhaps this:(A_TYPE<>'P' or W_TYPE<>'F') and A_TYPE<>'B' Be One with the OptimizerTG |
|
|
|
|
|