Hello experts,
I can not find a place for SAS Data Intergration so I will leave my question here.
I have a target oracle table that contain null value for some columns. I want to replace the null value with a space ' ' in oracle so I thought BL_PRESERVE_BLANKS=YES option in the bulk load will insert a blank for the null value. But it doesn't and I want to know how to make it working.
so DI flow chart like: source SAS table (with blank for some columns)------>bulk load (BL_PRESERVE_BLANKS=YES)----->Target oracle table (still null value)
I found update transform in DI is working too but want to explore if BL_PRESERVE_BLANKS=YES option in bulk load gives you same result.
Thanks
Bulk loading is for loading a source SAS table into a database table.
From what you write your source table is already in Oracle and you just want to replace NULL values for CHAR and VARCHAR2 with a single blank. That would be a SQL UPDATE.
If you're using pass-through SQL then you could use Oracle function NVL() or NVL2() for this task.
Hi Patrick,
It was my mistake, the source table was stored as SAS table and loaded to oracle through bulk load with bl_preserve_blank=yes. but I can still see null value when I do select column1 from oracletable where column1 is null
What's the Oracle data type of this column1?
problem solved. Thanks
How? Can you share what in the end the issue was and how you've resolved it?
Sure, I set the column to DBnull cannot be null and then BL_PRESERVE_BLANKS=YES works
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.