Hello Janet - thanks for the reply.

I should have mentioned that I need to get only the most recent transaction for 
each user within the given time-frame.  That's why I am using max().  Using 
this aggregate function, I think, requires I use "having," no?.

Thanks, CWB


>Use the WHERE not HAVING clause. Try something like
>
>SELECT ...
>FROM   ... 
>WHERE  dbo.tblSubscribers.SID = dbo.tblUserTransactionLog.SID
>AND    dbo.tblUserTransactionLog.Processed >= convert(datetime, '08/01/2007', 
>101)
>AND   dbo.tblUserTransactionLog.Processed <= convert(datetime, '08/07/2007', 
>101)
>GROUP BY
>  dbo.tblSubscribers.SID,
>  dbo.tblSubscribers.Username, 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

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

Reply via email to