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
Post a Comment