Page 1 of 1

Conversion from Char to Varchar

Posted: Thu Nov 05, 2009 12:19 pm
by pandujoy
Hi,

I have a char field coming from input and i am doing a lookup from DB which have a datatype of char. When i am deploying this as a serivce i am getting output as "��&#0" which are special characters.

is there a way to eliminate these ? If we use varchar we wont get it but we cant do a lookup against char to varchar.....please help me out :(

Posted: Thu Nov 05, 2009 1:59 pm
by ray.wurlod
Check the setting of APT_STRING_PADCHAR environment variable.

Posted: Thu Nov 05, 2009 3:19 pm
by pandujoy
it is set to 0x0 ...not sure what it must be..plz help me out

Posted: Thu Nov 05, 2009 3:22 pm
by pandujoy
its a Char (4) data type

Posted: Thu Nov 05, 2009 3:48 pm
by pandujoy
Thanks a lot for your help...I could solve it out...I made APT_STRING_PADCHAR....as 0x20 and used the trim function - Trim(<Col name>,Char(0),'A')