I have a perl DBI cgi application, and I need to sort rows in a Postgres database to present on a screen.
In my table, nulls(undef) is a common column value - my question is is it possible to sort the rows based on a column such that the sort is in ascending sequence, but that the rows with NULL (undef) values for that column are listed *last*? 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*? Thanks. -- Hardy Merrill Senior Software Engineer Red Hat, Inc.
