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!

Using LTRIM to remove a prefix that is not leading 0's

930058Aug 22 2012 — edited Aug 22 2012
I am trying to figure a way of removing leading "100000". I have a field that has been exported from SAP that filled it the remaining values with "100000". Luckily after the "100000" the true field value begins with a 1 or an alpha-numeric. My problem is that I tried using LTRIM(FIELD, '1000') but it wasn't pretty it removed all 0's and 1's. Is there a way that I can have it figure out the prefix of 10000000 or 1000 and remove it? I should probably note that I am doing a transformation in Informatica, this is where I am filtering. Also if you are wanting to see an example of the data here is what I am referring to:

10000091500450
1000KMTESTING

Thanks in Advance!

Rich
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 19 2012
Added on Aug 22 2012
12 comments
1,321 views