Page 1 of 2

Populate space to the output column

Posted: Mon Jan 24, 2011 5:07 am
by ajithaselvan
Hi,

I need to populate space to the output column.The data type for the column is float(2,5). Kindly help me to resolve.

Thanks,

Posted: Mon Jan 24, 2011 6:24 am
by Althaf6553
Is <Column Name>:' ' in the tranformer derivation not working?

Posted: Mon Jan 24, 2011 6:40 am
by ajithaselvan
No. printing zero in the output

Thanks

Re: POPULATE SPACE TO THE OUTPUT COLUMN

Posted: Mon Jan 24, 2011 6:41 am
by AVISSIVA
Hi,

1. Float data type should not contain space.

2. Anyway, if you load data into database with space automatically it may ignore the space.

3. Still if you need space, use transformer stage and Concatenate with space but the target column should be character.


Thanks

Posted: Mon Jan 24, 2011 7:03 am
by srinivas.g
set $apt_oracle_preserves_blanks is true and try....

Re: POPULATE SPACE TO THE OUTPUT COLUMN

Posted: Mon Jan 24, 2011 7:54 am
by chulett
ajithaselvan wrote:I need to populate space to the output column.The data type for the column is float(2,5). Kindly help me to resolve.
The answer is simple - it cannot be done. Get a new requirement... for example, is the field nullable? Can it be represented as a string?

Posted: Mon Jan 24, 2011 7:55 am
by chulett
srinivas.g wrote:set $apt_oracle_preserves_blanks is true and try....
Haven't seen any mention of Oracle yet...

Posted: Mon Jan 24, 2011 7:59 am
by chulett
Ajitha S - please don't post in all capital letters, it is considered SHOUTING. I corrected your post Subject for you, so more of just an FYI. Thanks.

Posted: Mon Jan 24, 2011 8:19 am
by ajithaselvan
chulett wrote:Ajitha S - please don't post in all capital letters, it is considered SHOUTING. I corrected your post Subject for you, so more of just an FYI. Thanks.
Sure craig. This will not be repeated.

Regarding my query,
I'm funneling 2 inputs of same columns. column(col3) from input 1 throwing a value. column(col3) from input 2 will be written as space.
I'm not storing it in table. I'm sending as fixed width file.

Eg;
col1,col2,col3
1,2,3
1,4," "

Is there anyother way to achieve this?


Thanks in advance

Re: POPULATE SPACE TO THE OUTPUT COLUMN

Posted: Mon Jan 24, 2011 8:21 am
by ajithaselvan
chulett wrote:
ajithaselvan wrote:I need to populate space to the output column.The data type for the column is float(2,5). Kindly help me to resolve.
The answer is simple - it cannot be done. Get a new requirement... for example, is the field nullable? Can it be represented as a string?
It can be nullable. But it can not be representated as string.

Regards,

Re: POPULATE SPACE TO THE OUTPUT COLUMN

Posted: Mon Jan 24, 2011 8:28 am
by chulett
ajithaselvan wrote:It can be nullable. But it can not be representated as string.
Actually, everything in a file is a string so it can. Set it to NULL and then edit the column so the 'null value' property is the appropriate number of spaces.

Re: POPULATE SPACE TO THE OUTPUT COLUMN

Posted: Mon Jan 24, 2011 8:40 am
by ajithaselvan
chulett wrote:
ajithaselvan wrote:It can be nullable. But it can not be representated as string.
Actually, everything in a file is a string so it can. Set it to NULL and then edit the column so the 'null value' property is the appropriate number of spaces.
Hi Craig,
It didn't work. populating zero.

Regards,

Posted: Mon Jan 24, 2011 9:02 am
by chulett
Then you missed something. Tell us exactly what you did to correct this - how you made sure the output field was null at the right time and what exact properties you set for that field.

Posted: Mon Jan 24, 2011 9:19 am
by ajithaselvan
chulett wrote:Then you missed something. Tell us exactly what you did to correct this - how you made sure the output field was null at the right time and what exact properties you set for that field.
Before funneling, in both the inputs for the particular column
1. Set the field as nullable
2. In Extended proerties, set null filed value as required space

As it is not necessary that the field should be null or not null, i have changed.

Regards,

Posted: Mon Jan 24, 2011 10:31 am
by chulett
OK... when you set the field to NULL (not a space ) it will show up in the file as whatever you put in for the null value - in this case as your 'required space'.