:26 AM
To: David Ruggles; 'mysql'
Subject: RE: Packing list sort
Try One of These (including name):
SELECT name,species,birth FROM animals ORDER BY
IF(species='hamster',0,1),species,name;
OR
SELECT name,species,birth FROM
(SELECT name,species,birth,IF(species='hamster
Original Message-
From: Rolando Edwards [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 22, 2008 10:23 AM
To: David Ruggles; 'mysql'
Subject: RE: Packing list sort
Try One of These:
SELECT name,species,birth FROM animalsORDER BY
IF(species='hamster',0,1),species;
OR
Try One of These:
SELECT name,species,birth FROM animalsORDER BY
IF(species='hamster',0,1),species;
OR
SELECT name,species,birth FROM
(SELECT name,species,birth,IF(species='hamster',0,1) sortorder
FROM animals) A ORDER BY sortorder,species;
-Original Message-
From: David Ruggles [mail
David Ruggles schrieb:
I have googled, read the mysql documentation and searched the list archive.
I don't know if I just don't know the correct term to use or if I have some
other problem.
In a nutshell I generate packing lists where the items are normally sorted
alphabetically. However, there