January 27, 2009 at 8:44 am
Hello,
Can this be done.
I want to return distinct name if complete is true on all rows
ID NAME COMPLETE
1volvo True
2volvo False
3volvo True
4saab True
would return:
saab true
ID NAME COMPLETE
1volvo True
2volvo True
3volvo True
4saab True
would return:
volvo true
saab true
// Regards Tomas
January 27, 2009 at 8:50 am
Nils Andersson (1/27/2009)
Hello,Can this be done.
I want to return distinct name if complete is true on all rows
ID NAME COMPLETE
1volvo True
2volvo False
3volvo True
4saab True
would return:
saab true
ID NAME COMPLETE
1volvo True
2volvo True
3volvo True
4saab True
would return:
volvo true
saab true
// Regards Tomas
select name, 'True' as Complete
from table
group by name
having count(*) = sum( case when complete = 'true' then 1 else 0 end )
* Noel
January 28, 2009 at 9:12 am
sweet!
Thanks alot.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply