It would help to know what database it was so the functions could be more
specific.

Select *
from table
where facility = 'Atlanta' and
** this will depend on if you mean null or blank
length function like len(audit_date) = 0 or audit_date is null and
**then use a date function to subtract 90 days from today
dateadd(dd,-90,getdate())<= rcvd_date
**another option is use a date function which finds the difference between 2
dates
datediff(dd,rcvd_date, getdate()) > 90

hope this helps.

-----Original Message-----
From: Tim [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 10:09 PM
To: CF-Talk
Subject: searching date ranges


I have a database with fields called facility,
rcvd_date and audit_date. I need to query the database
for a user selected facility with a rcvd_date that is
greater than 90 days old and the audit_date field is
blank.

For instance, the user selects Atlanta, and the query
will return all records for Atlanta, where the
rcvd_date is older than 90 days from the current date,
and the audit_date field is blank. So, if a record
 for Atlanta has a rcvd_date of 05/01/2001, it would
not be returned, but one with a date of 02/01/2001
would.

I have the facility portion done, but can not figure
out how to search the rcvd_date field to check the
records with dates 90 days old or more. Any ideas?

Tim
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to