P.S have you tried just putting it into query analyzer?

select * from main_table where datestamp > '12/01/2000'

If so did it work?




There are two major products that come out of Berkeley: LSD and [Unix] 
BSD. We don't believe this to be a coincidence.



Doug Brown
----- Original Message ----- 
From: "Darren Adams" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, January 28, 2002 8:16 AM
Subject: RE: SQL query help


> Well there are a number of options which users can search by.
> All the other ones work but, when they enter a date I cant compare the 

> dates
> and get it too work.
> 
> I tried the simple datestamp > date  but, that just didnt do anything 
> so I
> tried to do a between comparison.
> 
> Really all I want to do is get out all the records that are later that 

> the
> date the user specifys.
> 
> -----Original Message-----
> From: Chris Sinkwitz [mailto:[EMAIL PROTECTED]]
> Sent: 28 January 2002 16:12
> To: CF-Talk
> Subject: RE: SQL query help
> 
> 
> What are you trying to do with your where clause?
> 
> -----Original Message-----
> From: Darren Adams [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 28, 2002 8:41 AM
> To: CF-Talk
> Subject: SQL query help
> 
> 
> 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]
> 
> 
> 
> 
______________________________________________________________________
Why Share?
  Dedicated Win 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=coldfusionc
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