Quote:
quote:Originally posted by happygv
You can always delete your own post that you feel is mis-posted.
________________________
- Vijay G
Strive for Perfection
|
Heh... great post... I'll bet the new guy is really impressed... much better than posting a solution
Brux...
Here's one way... you'll need to ****************-horn the "test" table into a CTE... I can't do that because I don't have 2005 to test with...
Code:
SELECT t.*
FROM yourtable t,
(
SELECT X,COUNT(*) AS FullCount
FROM yourtable
GROUP BY X
) fc
,
(
SELECT X,COUNT(*) AS TrueCount
FROM yourtable
WHERE Z='T'
GROUP BY X
) tc
WHERE t.x = fc.x
AND t.x = tc.x
AND fc.FullCount = tc.TrueCount
Of course, you'll need to modify the code with the correct column names and table names...
--Jeff Moden