View Single Post
Old 07-03-2012, 03:41 PM   PM User | #1
zit1343
New to the CF scene

 
Join Date: Apr 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
zit1343 is an unknown quantity at this point
Sql filter command only if column value not equal

I have SQL command it currently shows
1.Name (Person'e name) I only want that starts with AR
2.Country (ANY COUNTRY) But sort them ASC A to Z
3.Normal_State (this is given in Binary) Most of them 3 & 4 are equal
4.Current_State (this is also given in Binary) Only want to if they are not equal

1 and 2 I got it to work, I need help getting 3 and 4 for example



Code:
SELECT
 NAME, 
Country, 
NORMAL_STATE, 
CURRENT_STATE 
FROM SOMS_TABLE 
WHERE SOMS_TABLE.NAME LIKE 'AR%' 
ORDER BY SOMS_TABLE.Country ASC
for example for image below I only want red one's to show up Thanks
zit1343 is offline   Reply With Quote