The date part of the datetime is the same the time part differs but the time
part is irrelevant to this report.  I was able to get this to work by
dropping the date out of the first query then running a second query in the
cfoutput of the first query:

        <cfquery name="rsGetPurchaseDate" datasource="#application.dsn#"
username="#application.dsnUsername#" 
        password="#application.dsnPassword#" maxrows="1">
            SELECT pur_Date_Purchased
            FROM tbl_HCFA_Purchase_Transactions
            WHERE Check_Num = #Check_Num#
            ORDER BY pur_Date_Purchased DESC
        </cfquery>

This just seems like a hack and it takes a lot of time for the page to run
now from 130ms up to 1380ms now on 200 records.  I am just looking for a way
to cut the timestamp off of the date in the first query.

I didn't realize in my first question that the GROUP BY needed exact
matching entries and has to group everything in the original SELECT

I am using an ACCESS database and am curious how I would use min( or max( to
get the oldest date for the current group.  I tried putting
max(pur_Date_Purchased) in my GROUP BY clause and am told no aggregate
functions are allowed in GROUP BY.

Travis Haley


-----Original Message-----
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 01, 2007 7:38 PM
To: CF-Talk
Subject: Re: Adding Small sections of a query

Which date do you want? You have multiple entries - which one should
the query return?

On 10/2/07, Travis Haley <[EMAIL PROTECTED]> wrote:
> But I need the date, should I run this in a second query?
>
> Travis Haley
>
> -----Original Message-----
> From: James Holmes [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 01, 2007 6:45 PM
> To: CF-Talk
> Subject: Re: Adding Small sections of a query
>
> Remove the date from the query.
>
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289889
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to