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!

Addition between padded numbers (strings) and numbers

NewApexCoderMay 26 2013 — edited May 26 2013
I've looked through the forums and I couldn't quite find an answer. So here's my issue. I have a list of jobs and they have job numbers. They are in the format 13-102C. They are made up of the fiscal year, a '-', the job number and a category. I have a query (within a process) that extracts/returns the job number

Declare MyJobNumber string(4);
Begin

select unique substr(Job_Number, 4, 3) into MyJobNumber
from Jobs;

End;

I need to increment this job number by one but am not sure how to do so. I'm guessing the result that is returned is more so a string so its a little more than simple addition. I need a little help on the issue. Also any suggestions or corrections to my current process would help as well. Thanks in advance.
This post has been answered by unknown-7404 on May 26 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2013
Added on May 26 2013
7 comments
657 views