Sum,Sort, Format, and Date Range
From: finster26 (finster26_at_discussions.microsoft.com)
Date: 03/07/05
- Next message: Alex: "Adding fields to query without Grouping"
- Previous message: Rick Brandt: "Re: DCount and Date format Question Against IBM DB2 Date"
- Next in thread: MGFoster: "Re: Sum,Sort, Format, and Date Range"
- Reply: MGFoster: "Re: Sum,Sort, Format, and Date Range"
- Reply: fredg: "Re: Sum,Sort, Format, and Date Range"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 7 Mar 2005 13:23:06 -0800
I have a DATE/TIME field and a Currency field.
I am formatting the date to "mmmm, yyyy" then GROUPING the by month/year and
SUM the Currency field.
I want to be able to select records between dates. I cannot use criteria in
the formatted date field to select the records bewteen dates. Formatted date
is a String. I also want to sort the formatted Date field but I it will not
sort correctly because it's a String.
SELECT DISTINCTROW Format([DIE HEADINGS].[DATE],'mmmm yyyy') AS [DATE By
Month], Sum([DIE HEADINGS].[COST DIECOST]) AS [Sum Of COST DIECOST]
FROM [DIE HEADINGS]
GROUP BY Format([DIE HEADINGS].[DATE],'mmmm yyyy');
What is the appropriate way to add the criteria and sort the records by
Month/Year?
Thanks,
Bob
- Next message: Alex: "Adding fields to query without Grouping"
- Previous message: Rick Brandt: "Re: DCount and Date format Question Against IBM DB2 Date"
- Next in thread: MGFoster: "Re: Sum,Sort, Format, and Date Range"
- Reply: MGFoster: "Re: Sum,Sort, Format, and Date Range"
- Reply: fredg: "Re: Sum,Sort, Format, and Date Range"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|