on 08-31-2006 1:26 PM
Hi
I got flat file with spaces, I used content conversion to transform this file into XML with fieldlenghts
I need to replace every sapce in the number "0"
any Ideas how to do it ?
thx,Shai
Hi Shai,
easy with XSL function translate()
<xsl:value-of select="translate(.,' ','0')"/>
Regards,
Udo
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 this is UDF
int intDif, i;
String strDiff = new String();
intDif = <b>10</b> - Par_Input.length();
if(intDif > 0)
{
strDiff = "0";
for(i=1; i<intDif; i++)
{
strDiff = strDiff.concat("0");
}
strDiff = strDiff.concat(Par_Input);
return strDiff;
}
else
{
return Par_Input;
}
This will add 10 leading zeros... You can change it accordingly. Also check if there is some space you are eppecting you can trim the sting.
Thanks,
Prakash
Shai,
Can you elaborate a further with the source data and the format needed.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.