Hi,
While extracting data from a table - I used TRIM to avoid unwanted blank spaces after the column value.
But I get space even after using TRIM and it fails to match with the look up file which does not have any unwanted blankspace - Subsequently my job fails.
What is the way out to remove the Blank space .
Thanks and regards,
Udankar
Using Trim - Even then getting Blank Spaces
Moderators: chulett, rschirm, roy
The TRIM function will remove spaces, but it might not remove characters that are not spaces but display as such. In your job add an extra test output column that displays the ASCII value of the last character in your test string - use and I will be willing to wager money that the value is not 32 decimal.
Code: Select all
SEQ(In.YourColumnName[LEN(In.YourColumnName),1])
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Jasper,
no, DataStage doesn't. There is no such thing as CHAR in DataStage, if a job reads CHAR columns they are padded with blanks. I think that in this case the TRIM() function isn't doing what is expected because the padding is not the normal space (char(32)) but nulls (char(000)) and that is why I asked the poster to test what values are actually in the string.
When working with PX jobs your comment about the differences between VarChar() and Char() are applicable.
no, DataStage doesn't. There is no such thing as CHAR in DataStage, if a job reads CHAR columns they are padded with blanks. I think that in this case the TRIM() function isn't doing what is expected because the padding is not the normal space (char(32)) but nulls (char(000)) and that is why I asked the poster to test what values are actually in the string.
When working with PX jobs your comment about the differences between VarChar() and Char() are applicable.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>