Hello,
I have been trying to figure out how to write this SQL
stmt..I have it written but it needs one more
modification....I need the query to only pull the
first unique EventID...
SELECT CMME.iMonthlyEventId as EventID,
CMME.iCMApptId as CMapptID,
cli.vClientFName + cli.vClientLName as
ClientName,
CMME.dMonthlyEventDate as Event Date,
cas.iCasacApptID as CasacID,
cas.dCasacDate as CasacDate,
emp.vEmpFName + emp.vEmpLNAme as Case_Manager,
cd1.vcodedecode as eventtypeName
FROM CMMonthlyEvent CMME, codedecode cd1,
Client cli, employee emp, CasacAppt cas,
CasacApptRelationship rel
WHERE emp.iempId = CMME.iempId
AND cas.iClientID = cli.iClientID
AND cd1.icodedecodeId = CMME.cEventTypeId
AND CMME.iCMApptId = rel.iCMApptId
AND cas.iCasacApptID = rel.icasacapptid
order by CMME.iCMApptId, dmonthlyeventdate
the partial results are:
EventID CMapptID .......
60 1
60 1
75 1
75 1
80 3
80 3
80 3
I want the results to be..
60 1
75 1
80 3
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists