[thelist] SQL ORDER BY question

Joshua Olson joshua at waetech.com
Thu Aug 22 10:25:00 CDT 2002


----- Original Message -----
From: "Jay Blanchard" <jay.blanchard at niicommunications.com>
Sent: Thursday, August 22, 2002 11:14 AM


> which is OK, but I would like to return;
>
> +----+----------------+------------+---------------+------+
> | ai |       id       |  logDate   |   logEntry    | lgHr |
> +----+----------------+------------+---------------+------+
> |  3 | PPT20020719TJB | 2002-07-18 | Repaired .... | 0.25 |
> |  2 | PPT20020719TJB | 2002-07-15 | Did this .... | 1.75 |
> |  1 | PPT20020719TJB | 2002-07-15 | Completed ... | 2.25 |
> +----+----------------+------------+---------------+------+

> Which is last in, first out BY DATE. But doing ORDER BY logDate, ai DESC
or
> ORDER BY ai, logDate DESC will not return the desired results either. I
have
> searched the web for ORDER BY information, cannot find what I am looking
> for. I would prefer to handle this in the SQL instead of programatically.
> What am I (aside from 75% of my brain) missing?

Try ORDER BY logDate DESC, ai DESC.

-joshua




More information about the thelist mailing list