Reply
Highlighted
New Contributor
Posts: 3
Registered: ‎01-22-2018

How to get the position of second occurred character in a string in hive

How to find the position of second occurred character in a string in hive.

 

For example:

if I run SELECT INSTR('ALLEN','L',1,2) FROM DUAL in oracle it will return the position of the second occurance of the character "L" i.e. is 2.

But how can I achieve this in hive.

Announcements