Hello, I am having a little trouble constructing this query because I need a count of a " distinct composite column combo - Date and CMid"..for example..here is the table and the columns in it: Date CMid value rate ----- ------ ------ ------ 02/02 1 3 6 02/02 1 8 2 02/02 2 6 9 02/02 3 5 5 02/02 3 1 2 05/02 3 1 5
so the count for the above table should be 4...and the SELECT stmt needs to look something like the one below as it is part of a Union stmt... SELECT Count(*) AS Totals, 'Monthly Contacts' AS Types, emp.FirstName, emp.LastName FROM CMMonthlyContact co, Employee emp WHERE co.dDateStamp >= '#variables.dBeginDate#' AND co.dDateStamp <= '#variables.dEndDate#' AND co.vUserStamp IN ('#variables.DataEntryEmp#') AND emp.iEmpID IN ('#variables.DataEntryEmp#') Any ideas? Thanks!!!!! __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists