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 |
|
thambi2010
Starting Member
1 Post |
Posted - 2010-10-12 : 17:52:20
|
| Hi ,value1 Count_value1 Value2 Count_val2 value3 count_val3OK 0 OK 0 ~C 300OK 0 OK 0 OK 0~A 1276 ~B 1276 ~C 300~A 1276 ~B 1276 ~C 300~A 1276 ~B 1276 ~C 300From above records, I want to take print result as below...value1 Count_value1 Value2 Count_val2 value3 count_val3~A 1276 ~B 1276 ~C 300above result I wanted to have...that means i need to ignore OK value and its count value(0) in each column.... I am thinking to filter using ~ operator .. but not getting clue...can you someone guide meRegards,Thambi |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-10-13 : 03:30:54
|
| Something to start with.Select distinct value1, Count_value1, Value2, Count_val2, value3 ,count_val3 from yourtable where value1 not in ('OK')orwhere value1 <>'OK' |
 |
|
|
|
|
|