A particular Column pattern is like this
10-Apple
11-Mango
Orange
78-Pineapple
45-Grape
And I want to make two columns out of it
col1 col2
10 Apple
11 Mango
null Orange
78 Pineapple
45 Grape
When I split the below string
SELECT split("10-Apple",'-',2)
It gives me ["10","Apple"] which is correct
But when I split below string which has no delimiter(-)
SELECT split("Orange",'-',2)
It gives me ["Orange"]
How can I have null instead of second element in the first place.
Like this [null,"Orange"]