*This message was transferred with a trial version of CommuniGate(tm) Pro*
This should do it in MS-SQL Server. I think Oracle has a different Date
convert function.

SELECT  title, date, where, description, time
FROM my table
WHERE (date > CONVERT(DATETIME, '2001-4-16 00:00:00', 102))
ORDER BY date DESC, time DESC

Dave Livingston
[EMAIL PROTECTED]


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


*This message was transferred with a trial version of CommuniGate(tm) Pro*
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to