Hi,
Write a simple User Defined Function.
String inputNumber; Int len= inputNumber.length(); String output= inputNumber.substr(len-6,len-1); return output
Regards
Bhavesh
Hi,
You can use a simple UDF to do this. It will work even if its a number.
The input to the UDFs' will always be string.
input: a,
put this code in your UDF,
return a.substring(a.length()-5,a.length());
This should work.
Regards,
P.Venkat
Add a comment