At 11:54 AM 2/27/2003 -0800, you wrote:

>Trying to query a database  to get all the records where the bdate is in
>the same month and year.  This example is only the month.  But it is not
>working what am I missing.
>I am using CF5 and Access
>
>
><CFQUERY datasource="#application.db#" name="howmany">
>select id,title,sdescrip, bdate
>from courses
>where bdate <> NULL
>and #dateformat(bdate, m)# = #Dateformat(searchdate, "m")#
>order by bdate,title
></CFQUERY>

Looks like you're using CF function to dynamically create a reference to 
the SQL column.
Assuming: Search Date = "02-01-03" and bdate = "02-14-03", you query will 
be executed as:

-----

select id,title,sdescrip, bdate
from courses
where bdate <> NULL
and 2 = 2

------

I imagine you're getting all rows back where bdate isn't null, correct?


>Joy ;-*
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

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

Reply via email to