Page 1 of 1

Writing to Fixed width file

Posted: Mon Apr 28, 2008 6:32 pm
by parsi_cnu
When i am writing a numeric field the data is preceded with blank and the actual value

eg:actual value1000.00 and data showing in the file as ' 1000.00'. there is a blank infront of 1 and im not able to trim this.

how to handle this?

Thanks
sri

trim(col_name,' ','A')

Posted: Mon Apr 28, 2008 6:42 pm
by just4u_sharath
trim(col_name,' ','A')
try this

Actually i am calculating field in the transformer

Posted: Mon Apr 28, 2008 7:03 pm
by parsi_cnu
actually i am dividing numeric column/10

source numeric column(length 7)/10 and target numeric column of length 6,2

Posted: Mon Apr 28, 2008 7:05 pm
by just4u_sharath
try this

TRIM(TRIM(COL_NAME,CHAR(10)),CHAR(13))

Posted: Mon Apr 28, 2008 7:09 pm
by ray.wurlod
The space is the sign character. You could specify the Numeric data type to be unsigned.

Len(Trim(numeric_col))

Posted: Mon Apr 28, 2008 7:23 pm
by parsi_cnu
How can we do?


thanks
sr