Skip to content
Advertisement

Separate numeric values and character values in oracle

A table contains both numeric and character values in a column. The numeric values and character values need to be separated in different columns

Col1
1
2
3
A
B
C

The output needs to be

col1 col2
1 A
2 B
3 C

Advertisement

Answer

You could do this using conditional aggregation:

You cold simplify this a bit using a lateral join:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement