Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Use Max function for alphanumeric value

572055Sep 6 2010 — edited Sep 7 2010
Hello All,
I have the following values and I want to get the maximum value i.e. 2a after trimming from first '.'

When using "select max(to_number(substr(filename,1,instr(filename,'.',1)-1))) maxfile from deploy_ctl.deployment_history where tag='3.1'" gives me error.

I want the maximum value of the sequence which is before the first '.'


SQL> select filename from deployment_history;

FILENAME
--------------------------------------------------------------------------------
1.tab1.sql
2.tab1.sql
2a.tabl1.sql

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2010
Added on Sep 6 2010
6 comments
2,151 views