Page 1 of 1

Trim Char Datatype

Posted: Tue Dec 16, 2008 3:53 am
by tkbharani
Hi

I am trying to TRIM the Char datatype in Transformer stage.
Process
---------
Output column from teradata isCHAR datatype. At times when lookup fails the column will not be populated(It must be NULL). BUT when I try to check it for NULL or '' , its not working. When i check the length of the column its always 4, though in unix its is NULL.

I tried
TRIM(inputcolumn,'','D') -Not working
Convert() not working.

Any way to Trim the CHAR datatype , so that I can check IsNull function.

Thanks

Posted: Tue Dec 16, 2008 4:06 am
by hamzaqk
How are you extracting data from TD?? are you specifying a query to pull out data? if yes to the TRIM in the query.

Re: Trim Char Datatype

Posted: Tue Dec 16, 2008 6:30 am
by tkbharani
Hi

I just used a copy stage between Teradatastage and Lookup stage, input column is CHAR and same column in output is VARCHAR. As I am checking for IsNull() its working fine.
If still there is way of triming in it transformer , please reply.

Posted: Tue Dec 16, 2008 7:51 am
by chulett
You can't trim a CHAR.