if you are working with todays date, use sysdate
valid_to_date > sysdate

What driver are you using?
typically for ODBC drivers you need to use to_date
valid_to_date > TO_DATE('04/02/2003', 'MM/DD/YYYY')

...just some thoughts

Doug

>-----Original Message-----
>From: David Hannum [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, April 02, 2003 11:50 AM
>To: CF-Talk
>Subject: CF5/Oracle Query Question
>
>
>When I run the following query in SQLPlus, any row with a 
>'valid_to_date'
>older than today's date is excluded.  But when I run the same 
>query in CF,
>they are included.  Why?
>    ~~ CF 5 on Win2K hitting Oracle 8i on IBM Mainframe ~~
>    valid_to_date is a date field, not varChar2
>
>SELECT ID, course_prefix, course_number, course_title, valid_to_date
>FROM siswarehouse.course_description
>       WHERE course_prefix LIKE 'W%' AND
>    (valid_to_date IS NULL OR
>        valid_to_date = '' OR
>        valid_to_date > '02-Apr-2003')
>ORDER BY course_prefix, course_number
>
>Thanks,
>Dave
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89
70.4
                                

Reply via email to