Thanks Matthew
DISTINCT was a good idea.

-paul



-----Original Message-----
From: Matthew Walker [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 5:54 PM
To: CF-Talk
Subject: RE: Date Problems Again :: Yet Another one


Something like 

SELECT DISTINCT Year([KidDate]) AS TheYear, Month([KidDate]) AS TheMonth
FROM tblKid
ORDER BY Year([KidDate]), Month([KidDate]);

Then you don't need the CF group at all. You will need MonthAsString().

Regards,
Matthew Walker
/*
        Cabbage Tree Creative Ltd
        Christchurch - New Zealand

        http://www.matthewwalker.net.nz/
        http://www.cabbagetree.co.nz/
*/


-----Original Message-----
From: Paul Ihrig [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 9 April 2002 9:02 a.m.
To: CF-Talk
Subject: Date Problems Again :: Yet Another one


Yet Another Problem
i am trying to group by Month/Year
i just cant seem to get it.

i have read ever thing i can find in WACK
on group, GROUP BY, & CreateODBCDate
to no avail.

I have tried <cfoutput query="rsViewDate"
group="#LSDateFormat(rsViewDate.KidDate,'MMMM YYYY')#"> but that does
nothing good.


in this query.
i want it to show my dates entered
but on duplicates of the date.

so all the entrees for this month would just be in the select as April
2002

Thank You!


<cfquery name="rsViewDate" datasource="kid">
SELECT KidDate
FROM tblKid
GROUP BY KidDate
ORDER BY KidDate ASC 
</cfquery>

<select name="KidDate" class="input">
<option value="">Select Date</option>
<cfoutput query="rsViewDate" group="KidDate"> 
<option
value="#rsViewDate.KidDate#">#LSDateFormat(rsViewDate.KidDate,'MMMM
YYYY')#</option>
</cfoutput> </select>

-paul


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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

Reply via email to