Mark A Matte
markamatte at hotmail.com
Wed Sep 12 11:53:27 CDT 2007
Hello All, I apparently did this months ago...but just re-discovered it...I'm sure most probably know how to do this...but thought I'd share anyway and ask if anyone can explain why it works? I have a crosstab query for statuses. I needed a count of each status and a total for each user. And I did it in a singly query...I'm just not sure WHY it works...?!?!?!?! Below is the SQL...any thoughts? Thanks, Mark A. Matte *******SQL********* TRANSFORM Count(*) AS Stat SELECT tblData.CCMS_User, Count(*) AS Total FROM tblData WHERE (((tblData.Status)<>"closed")) GROUP BY tblData.CCMS_User PIVOT tblData.Status In ("Pending","New","Follow Up"); *******SQL********* _________________________________________________________________ Share your special parenting moments! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us