on 01-11-2007 5:27 AM
Hi,
I have a number of variable length at the source, now i need to just consider only the last five digits of the number to map it to target, could anybody help me with this. the source field length is always greater than 5.Thank you.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.