Query/SubQuery that sorts and totals (1 Viewer)

Marbinski

Registered User.
Local time
Yesterday, 16:17
Joined
Aug 24, 2004
Messages
45
I need help creating a query that searches filters a certain field. (TelcoID) I want to be able to query certain crtiteria within the TelcoID, such as values with "X" in it. Then after querying values with "X" in it. I need to query records with "C" in it from the "X" query. For each query I also need the amount of records for each individual query.(ie. how many records that have "X" and how many records that have "X" and "C".)

I'm thinking i need to create subqueries....but I need some guidance. Thanks for any help!!
 
Local time
Yesterday, 16:17
Joined
Aug 2, 2004
Messages
272
Does this help?

SELECT Count(Table1.TelCo)
FROM Table1
WHERE (((Table1.TelCo) Like "*X*"));
union
SELECT Count(Table1.TelCo)
FROM Table1
WHERE (((Table1.TelCo) Like "*C*"));
union
SELECT Count(Table1.TelCo)
FROM Table1
WHERE (((Table1.TelCo) Like "*C*" And (Table1.TelCo) Like "*X*"));
:cool: :) :D
 

Users who are viewing this thread

Top Bottom