Skip to Main Content

SQL & PL/SQL

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!

max with lpad

mlov83Aug 3 2009 — edited Aug 3 2009
I have an easy one but just cant seem to get it to run im trying to get the max of a number add 1 and then lpad it with 0's i keep getting the error not a single group or function. can someone please point out the obvoius mistake here... my desired result is A00000021
Thanks in advance.
SELECT lpad(MAX(SUBSTR(FABCHKS_CHECK_NUM,2,7))+1||fabchks_check_num,7,'0')
FROM FABCHKS WHERE FABCHKS_CHECK_NUM LIKE 'A%' ;
Edited by: user633029 on Aug 3, 2009 3:21 PM

Edited by: user633029 on Aug 3, 2009 3:24 PM
This post has been answered by Frank Kulash on Aug 3 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2009
Added on Aug 3 2009
2 comments
639 views