Hi,
I know Access does support DatePart() as I've used it before and I'm
certain that the two fields are the same data type.
The part about referencing an alias in my where clause is the part I'm
not certain about. I did try this....
<cfquery name="qGetMonthsData"
datasource="Tech">
SELECT FeedbackID, SubmittedBy, SubmittedDate, Q1, Comments, CallID
FROM Feedback
WHERE Month(SubmittedDate) = #URL.Month#
ORDER by SubmittedDate DESC
</cfquery>
SELECT FeedbackID, SubmittedBy, SubmittedDate, Q1, Comments, CallID
FROM Feedback
WHERE Month(SubmittedDate) = #URL.Month#
ORDER by SubmittedDate DESC
</cfquery>
But I get the same
error.
All I want to do is display results from a
table broken down by month, where the month displayed is the one asked for in
the url. The month to compare comes from the DateSubmitted field. I didn't want
to have to store a seperate month field to query by, but it looks like I'll have
to.
:(
Thanks Steve.
--------Original Message-----
From: Steve Onnis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 6 August 2003 1:09 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: Query on a query!Few things maybeI dont think ACCESS supports DatePart()Does the variable URL.Month confirms with the data type of MontheRequested?MonthRequested is an alias, so I dont think you can reference it in your query as a valid column name.A few things to look atSteve--------Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Kylie Lindstrom
Sent: Wednesday, August 06, 2003 12:58 PM
To: CFAussie Mailing List
Subject: [cfaussie] Query on a query!Hi All,Can someone tell me what my obvious flaw in this query is?<cfquery name="qGetMonthsData" datasource="Tech">
SELECT FeedbackID, SubmittedBy, DatePart('m', SubmittedDate) AS MonthRequested, SubmittedDate, Q1, Comments, CallID
FROM Feedback
WHERE MonthRequested = #URL.Month#
ORDER by SubmittedDate DESC
</cfquery>The error I get is this:
Error Executing Database Query.
[MERANT][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. Thanks to all in advance!Kylie Lindstrom
Web Designer
Liberty Financial
Telephone (61 3) 8635 8803
Facsimile (61 3) 8635 9988
Mobile (0407) 366 797
Website www.liberty.com.au
_____________________________________________________________________
NOTICE - This message contains confidential information intended only
for the use of the addressee named above. If you are not the intended recipient of
this message you are hereby notified that you must not disseminate, copy or take
any action in reliance on it. If you have received this message in error please
notify Liberty Financial in Australia on (61 3) 8635 8888 immediately.
Any views expressed in this message are those of the individual sender, except
where the sender specifically states them to be the views of Liberty Financial.
_____________________________________________________________________---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
