MySQL Forums
Forum List  »  Newbie

if statment in ORDER BY
Posted by: junk
Date: August 02, 2005 09:04AM

I have 3 colums to order my selection by. Column A B and C. I cant get my ORDER BY-query to work. What I like to do is always first order by "A" (A CAN NOT BE NULL). Then order by "B" only if B is NOT NULL, otherwise and last order by "C". How is is this possible?

Options: ReplyQuote


Subject
Written By
Posted
if statment in ORDER BY
August 02, 2005 09:04AM
August 02, 2005 12:51PM
August 03, 2005 02:35AM
August 03, 2005 02:52AM
August 03, 2005 02:59AM
August 03, 2005 03:19AM
August 03, 2005 03:45AM
August 03, 2005 04:40AM
August 03, 2005 04:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.