Skip to content
Advertisement

How to trim leading zero in Hive

How to trim leading zero in Hive, I search too much on google but I didn’t get any correct thing which is useful for my problem.

If digit is “00000012300234” want result like “12300234”

Advertisement

Answer

nothing to do just cast the string in INT

SELECT CAST( "00000012300234"  AS INT);

it will return 12300234

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