RE: SQL ORDER BY Problem

2000-09-05 Thread DeVoil, Nick
Let's hope this one gets there a bit quicker.. James What's wrong with SELECT Date FROM Dates ORDER BY Date? (You're not really using the name Date I guess) Nick ** Information in this email is confidential and may be

Re: SQL ORDER BY Problem

2000-09-05 Thread James Smith
ay, September 05, 2000 2:23 PM Subject: RE: SQL ORDER BY Problem Let's hope this one gets there a bit quicker.. James What's wrong with SELECT Date FROM Dates ORDER BY Date? (You're not really using the name Date I guess) Nick *

RE: SQL ORDER BY Problem

2000-09-05 Thread DeVoil, Nick
OK James, I understand what you're trying to do now. You can do it all in one SQL statement using database functions rather than going back to CF to do the work, it should be a lot faster. What DBMS are you using? Nick **

Re: SQL ORDER BY Problem

2000-09-05 Thread James Smith
ODBC connection to Access. - Original Message - From: "DeVoil, Nick" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 05, 2000 2:43 PM Subject: RE: SQL ORDER BY Problem OK James, I understand what you're trying to do now. You can do it all in one SQL state

Re: SQL ORDER BY Problem

2000-09-05 Thread David Shadovitz
Wouldn't your results be the same if you just ordered by Date? You're merely (trying to) subtract a constant from each Date. -David On Tue, 5 Sep 2000 "James Smith" [EMAIL PROTECTED] writes: I have a query that selects dates from a datasource, and I would like to order by the number of days

RE: SQL ORDER BY Problem

2000-09-05 Thread DeVoil, Nick
ODBC connection to Access. Then you should be able to replicate the functionality of your CF statement with the Access functions DatePart(), DateDiff() and Now(). HTH Nick ** Information in this email is confidential and may

Re: SQL ORDER BY Problem

2000-09-05 Thread James Smith
Then you should be able to replicate the functionality of your CF statement with the Access functions DatePart(), DateDiff() and Now(). I had considered this, but the actual code requires an if statement cfif datecompare(createdate(year(now()), month(date), day(date)), now()) LTE 0

RE: SQL ORDER BY Problem

2000-09-05 Thread DeVoil, Nick
look at iif Nick ** Information in this email is confidential and may be privileged. It is intended for the addressee only. If you have received it in error, please notify the sender immediately and delete it from your

Re: SQL ORDER BY Problem

2000-09-05 Thread David Shadovitz
Don't databases store 'date' types such that they CAN be compared exactly as you want? -David On Tue, 5 Sep 2000 14:30:57 +0100 "James Smith" [EMAIL PROTECTED] writes: ORDER BY Date will include the year, so 01/JAN/1940 will always appear before 02/DEC/1999 even though on 01/DEC/2000 it is

Re: SQL ORDER BY Problem

2000-09-05 Thread Chris Terrebonne
SELECT Date, #DateDiff(date, now())# AS "DateSpan" FROM Dates ORDER BY DateSpan chris -- Original Message From: "David Shadovitz"[EMAIL PROTECTED] Subject: Re: SQL ORDER BY Problem Date: Tue, 5 Sep 2000 06:18:33 -0700 W

RE: SQL ORDER BY Problem

2000-09-05 Thread Chris Terrebonne
bject: Re: SQL ORDER BY Problem SELECT Date, #DateDiff(date, now())# AS "DateSpan" FROM Dates ORDER BY DateSpan chris -- Original Message From: "David Shadovitz"[EMAIL PROTECTED] Subject: Re: SQL ORDER BY Problem Date: Tue, 5 Sep 20

RE: SQL ORDER BY Problem

2000-09-05 Thread Dan Haley
SQL statements and functions for manipulating each row of the query. Dan -Original Message- From: Chris Terrebonne [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 05, 2000 9:45 AM To: [EMAIL PROTECTED] Subject: Re: SQL ORDER BY Problem SELECT Date, #DateDiff(date, now())# AS "Dat