Hi Team,
Can anyone please help me here.
I want to eliminate all leading '0' from an Aphlanumeric string but the condition is if string contains all zeros then it should leave one zero as output:
Ex:
I/p string: 0000123SUMIT
O/P: 123SUMIT
I/P: 000000
O/P: 0
I/P: 000120120SUMI
O/P: 120120SUMI
I/P: 000120-120~SUMI
O/P: 120120SUMI
I/P: null
O/P: null
I am using below expression but it is not fulfilling 2nd option(in Example)
select REGEXP_REPLACE('0000', '(*[[:punct:]|[:blank:]]|^0+)') from DUAL
Thanks in Advance.
Thanks ,
Sumit