View Single Post
  #1 (permalink)  
Old June 24th, 2012, 12:33 PM
ricespn ricespn is offline
Authorized User
Points: 245, Level: 4
Points: 245, Level: 4 Points: 245, Level: 4 Points: 245, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2006
Location: Houston, TX, USA.
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ricespn
Default Get Completed Boxes from a table

Hi guys,

I have the folloing table:

docID, boxNumber, docCompleted

1235, box01, true
1234, box01, true
1233, box01, false
1245, box02, true
1987, box03, true
1097, box06, false

I'm trying to use a Distinct to display the box number that have been competed. If I do my query like so:

Code:
Select distinct(boxNumber) from table1 where docCompleted=true
but that will list box01 even tho one docID (1233) is not completed.

Any help ?
__________________
=======================
Strange and crazy, but everything is possible