0

I am facing a unique challenge, the problem I'm facing is something like this:

I need to ignore the zero from the input: For example

Example 1
Input --> 1580
output --> 158

Example 2
Input --> 3008
output --> 38

Is there any built function or through normal query I can solve the above problem or do I need to write custom pl/sql code.

Please suggest.

2

1 Answer 1

1

SQL:

select 3008 original, REPLACE(TO_CHAR(3008), '0', '') replaced from dual;

Result:

original | replaced
---------|----------
3008     | 38
---------|----------
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.