Page 1 of 1

Null Handling

Posted: Wed Aug 04, 2010 4:57 pm
by reachmexyz
Hello all

I am trying to load 2 columns into a table. One of the columns can be null.in the xformer i have used NullToEmpty(FieldName) and loaded into database. When i query the database, i see <Null> in that field. I was expecting an empty string. I am not expecting <Null> as i have already handled it. Is Empty string not differenct from null?
Please reply

Re: Null Handling

Posted: Wed Aug 04, 2010 5:24 pm
by synsog
What Database you are using as target?

Re: Null Handling

Posted: Wed Aug 04, 2010 5:28 pm
by reachmexyz
Oracle 9i

Re: Null Handling

Posted: Wed Aug 04, 2010 8:19 pm
by reachmexyz
reachmexyz wrote:Oracle 9i
Can somebody please help me on this

Posted: Wed Aug 04, 2010 8:23 pm
by chulett
Be patient, people post when they can - this isn't a 24 hour hotline. :?

Also, please learn to use the Reply to topic link, there's no need to quote something every dang time.

Posted: Wed Aug 04, 2010 8:26 pm
by chulett
While nulls and empty strings are two different things, Oracle is perfectly happy to turn one into the other. Add $APT_ORACLE_PRESERVE_BLANKS to your job and set it to "true", see if that helps.

Posted: Wed Aug 04, 2010 9:41 pm
by reachmexyz
chulett wrote:While nulls and empty strings are two different things, Oracle is perfectly happy to turn one into the other. Add $APT_ORACLE_PRESERVE_BLANKS to your job and set it to "true", see if that helps.
Thanks for the reply.
Unfortunately it is not working. what can i do more to make empty string stay as empty string instead of convertin to null.

Posted: Wed Aug 04, 2010 9:44 pm
by chulett
Apparently the Reply to topic link is not working either. [sigh]

"Not working" doesn't really give us much to go on, how about more information? Say, your job design, stages used (particularly the target stage), settings there, etc etc etc. Details are your friend.

Posted: Thu Aug 05, 2010 1:36 am
by Sreenivasulu
You need to give further details on the issue OR you yourself need to try with one column and observe the results.
Regards
Sreeni

Posted: Thu Aug 05, 2010 1:55 am
by ray.wurlod
reachmexyz wrote:Unfortunately it is not working.
:idea: "Not working" is the meaning of "unemployed".

Posted: Thu Aug 05, 2010 8:56 am
by Poovalingam
In Oracle, when you insert a empty string, this will be inserted as null I guess.

create table xx ( c1 varchar2(4));

insert into xx values ('');

select * from xx where c1='';
ans: no rows selected.

select * from xx where c1 is null;

Ans: c1
---