On 3/7/07, Claude_Schnéegans <[EMAIL PROTECTED]> wrote:
>
>
> <CFSET thirdletterdate = DateAdd("d", -7, get.expiration)>
>
> <cfquery name="Getnow" datasource="trials">
> Select * from trials_info
> where expiration eq #CreateODBCDate(thirdletterdate)#
> order by expiration desc
> </cfquery>
>
> This should work, provided expiration has been entered using
> CreateDBCDate.
> If it was entered with a time value different from 00:00:00, the equality
> won't work.


Don't use createODBCDate()!

<cfquery name="Getnow" datasource="trials">
Select * from trials_info
where expiration = <cfqueryparam cfsqltype="cf_sql_timestamp"
value="#thirdletterdate#">
order by expiration desc
</cfquery>
(not also that "eq" is not a valid comparison operator in SQL ;)

Rick


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271923
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