Assuming your query works the way it is suppsoed to (ie. when you run the query, it returns the correct rows) then you should be able to do:
SELECT COUNT(*) FROM categories WHERE categories.categoryid NOT IN ( SELECT DISTINCT categoriescategoryid FROM BANNER_categories WHERE BANNERBANNERID = 10 ) Which is slightly different from the 3 examples you listed. Hope this helps. Dan Morton > > SELECT * FROM categories WHERE > categories.categoryid NOT IN > ( SELECT DISTINCT categoriescategoryid > FROM BANNER_categories WHERE BANNERBANNERID = > 10) > > if we think this statement is A then i tried : > I tried : > select count(*) from (A) > select count(A) > select count(*) , A > .... > > but still i can not find this statement total > returning rows. > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
