Jeff,

>Something like this
If you are actually using 'date', 'time' and 'where' as field 
names in your database ... they are SQL reserved word.

If they are not, perhaps:

SELECT  title, titledate, titlewhere, description, titletime
FROM my table
WHERE titledate >= #CreateODBCDate(NOW())#
ORDER BY titledate ASC

Joe Hoffman mailto:[EMAIL PROTECTED]
National Institutes of Health 
Center for Information Technology 
Division of Computer System Services

-----Original Message-----
From: Jeff Fongemie [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 3:18 PM
To: CF-Talk
Subject: SQL help


Hello cf-talk,

  I'm stuck over how to do this.

  I have a table and each record has a date field (long date format).

  I need to display the records on a page where the record with the
  date closest to the current date when the page is viewed will
  display first, then the records whose dates are in the future in
  chronological order. Something like this:


   SELECT  title, date, where, description, time

   FROM my table

   WHERE date after today

  ORDER by chronological order


   I can't seem to get the WHERE part right.

   Any suggestions??


Best regards,
 Jeff Fongemie                          mailto:[EMAIL PROTECTED]
------------------------ 
Internet Guns For Hire
(603) 356-0768
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to