Page 1 of 1

Oracle Enterprise Stage: Converting Blanks to Null

Posted: Tue Jun 30, 2009 3:26 am
by dsusr
Hi All,

We are facing an issue while using Load-Append in Oracle Enterprise Stage where all the Blanks are getting converted to Null.

We tried setting the environment variable $APT_ORACLE_PRESERVE_BLANKS to true at job level but still the control file for SQL Loader have the condition: 'NULL if startlength:endlength = BLANKS'.

I have gone through few of the posts which says the variable has worked but just wondering if anyone has tried this on Sun Solaris Install.

Regards,
dsusr

Posted: Tue Jun 30, 2009 4:40 pm
by ray.wurlod
Check $APT_STRING_PADCHAR as well.

Posted: Wed Jul 01, 2009 6:09 am
by dsusr
ray.wurlod wrote:Check $APT_STRING_PADCHAR as well. ...
Hi Ray,

Thanks for the reply but not sure how this variable is going to have an impact on this issue since we are only dealing with Varchar fields. Anyway the value is set to Null for APT_STRING_PADCHAR i.e. 0x0

Our problem is that we have a Varchar2(30) field which is having a single space character in source. While loading the data using Load-Append Method the Single Space is getting converted to Null.

The possible workaround is to use Upsert with Insert Only condition.

Regards,
dsusr

Posted: Wed Jul 01, 2009 3:20 pm
by Kryt0n
dsusr wrote: The possible workaround is to use Upsert with Insert Only condition.
What "insert only" condition?

Have you tried sending the output to a flat file instead of a load to Oracle to confirm the space does exist and not stripped somewhere during processing?

Second, you sure it is a varchar field? If so, do you have "NULL if x:y = BLANKS" on all varchar fields?