order by text

From: C-man <c00ldiabl0_at_gmail.com>
Date: Wed, 13 Feb 2008 13:49:12 -0800 (PST)
Message-ID: <4a27b4f8-93bb-4988-8b86-c27f7c831466@e25g2000prg.googlegroups.com>


I have a variable field of type varchar2 called storeId. I need to sort the store Id's but they are of variable length and some of them contain characters and digits while others contain only digits. I tried using order by lpad(storeId, 10) asc but it does not work in the case that 1 id is a11 and another one is b2. It gives me b2 and then a11.

Is there a way to fix this?

Thank you Received on Wed Feb 13 2008 - 15:49:12 CST

Original text of this message