Hi guys

Can anyone help,  I just need to check that the date of a record in a
database is within a specific range.

<cfset today = dateformat(now(),"dd/mm/yyyy")>
<cfoutput>#today#</cfoutput>

<cfquery name="browse" datasource="marketing" dbtype="ODBC">
select * from main_table
where  1=1 
<cfif #date# NEQ "DD/MM/YYYY"> and datestamp BETWEEN '#date#' AND #today#
</cfif> 
<cfif region NEQ "--- Select ---"> and region = '#region#'</cfif> 
<cfif material NEQ "--- Select ---"> and material = '#material#'</cfif>
<cfif vertical NEQ "--- Select ---"> and vertical = '#vertical#'</cfif>
<cfif target NEQ "--- Select ---"> and target = '#target#'</cfif>
<cfif product NEQ "--- Select ---"> and product_service = '#product#'</cfif>
</cfquery>


This query give me an error in assignment.

I know that this should be easy but I cant think of it!!!

Cheers,
Darren Adams
Web Developer
Marketing Department
Systems Union

mail: [EMAIL PROTECTED]

______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to