Skip to Content
0
Former Member
Aug 04, 2016 at 03:55 PM

How to Identify a Column value is char or not

76 Views

Hi,

We have a Column 'Cost Center' which has both Numeric and Alphanumeric values. We have a requirement where we want to Pad '0' to Numeric Cost centers and leave 'Alpha Numeric Cost centers value as it is.

Cost center Desired Output

Example : 5789 - 0000005789

8123MRG - 8123MRG

We can do the padding for Numeric Cost Centers using LPAD function.

But need to identify the cost center which has characters in it.

Do we have any function which identifies if it is 'Char' or

Any function that identifies whether the value is ' Numeric'

Appreciate your help.

Thanks,

Ganesh