On Wed, 2002-07-17 at 13:45, Hardy Merrill wrote:

> If my table is "users", and some users have no(undef) addr1 column,
> the current sort by "addr1" lists users *first* who have no value
> for addr1.  Is there an easy way to sort such that the rows are
> still listed in ascending order by "addr1", but have the rows
> that have no addr1 value listed *last*?

Well, the easiest way (in the SQL query) is to use COALESCE or a similar
function for your database.  Just do something like

.... ORDER BY COALESCE(addr1,'ZZZ') ...


-- 
Jeff Boes                                      vox 616.226.9550 ext 24
Database Engineer                                     fax 616.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
           ...Nexcerpt... Extend your Expertise

Reply via email to