SQL Language (MOSC)

MOSC Banner

How to remove certain number of characters from either right or left for a string?

edited Sep 12, 2012 8:19PM in SQL Language (MOSC) 3 commentsAnswered ✓
Hi there,

I need to remove a certain number of characters (such as 3) from a string from either ends.  I have tried TRIM, SUBSTR and nothing works.  There must be a way to do it.  Please help.

Here is an example:

Two values:  123456700000 and 123456000 and I want to remove only 3 zeros from right, not all zeros, so that I get: 123456700 and 123456.

Thanks,

Ning

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center