Wednesday 14 December 2022

Hive: lpad: Pad the characters to left side of string

Signature

lpad(string str, int len, string pad )

  Pad the characters to the string at leftside until the string reaches to given length.

 

hive> SELECT lpad('He', 5, 'X');
OK
_c0
XXXHe
Time taken: 0.043 seconds, Fetched: 1 row(s)
hive> ;
hive> ;
hive> SELECT lpad('He', 4, 'X');
OK
_c0
XXHe
Time taken: 0.04 seconds, Fetched: 1 row(s)

 

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment