Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group by in query in access 2003

Status
Not open for further replies.

khicon73

MIS
Jan 10, 2008
36
This is a list in my query.
Code Date EP_Num
1 6/16/2008 1
1 6/16/2008 0
2 6/17/2008 1
3 6/17/2008 1
3 6/17/2008 1
3 6/17/2008 2
4 6/17/2008 1
4 6/11/2008 0
4 6/18/2008 1
4 6/18/2008 1
5 6/18/2008 0
6 6/18/2008 1
6 6/18/2008 1
6 6/18/2008 1
6 6/18/2008 1

I would like a result to list all codes have ep>0. Whichever has ep = 0 would eliminate others also.

Results:

2 6/17/2008 1
3 6/17/2008 1
3 6/17/2008 1
3 6/17/2008 2
6 6/18/2008 1
6 6/18/2008 1
6 6/18/2008 1
6 6/18/2008 1

Please help, thanks alots.
 
As in:

Code:
SELECT Code, Date, EP_Num 
FROM tblT 
WHERE Code Not In (
              SELECT ID 
              FROM tblT 
              WHERE EP_Num=0)
 
Thanks Remou. The code worked like charm...
Once, thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top