sql - Deleting Part of a string in HIVE -


i trying delete part of string in hive. want delete last eleven characters records in column. data looks like:

1018492743|0001-01-01

i want like:

1018492743

the code have tried looks like:

select right(a.ord_id, len(a.ord_id)-ll)

it isn't working because len isnt function in hive

another issue have of records in correct format. mean need create case statement checks this?

hive> select substring_index('1018492743|0001-01-01','|',1); ok 1018492743 

Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -