BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
gyambqt
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
7 REPLIES 7
LinusH
Tourmaline | Level 20
This is definitelythe right place!
Please share the code/log from your trial, along with the table definition (in Oracle) for the target table.
Data never sleeps
Patrick
Opal | Level 21

@gyambqt

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.

gyambqt
Obsidian | Level 7

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

Patrick
Opal | Level 21

@gyambqt

What's the Oracle data type of this column1?

Patrick
Opal | Level 21

@gyambqt

How? Can you share what in the end the issue was and how you've resolved it?

gyambqt
Obsidian | Level 7

Sure, I set the column to DBnull cannot be null and then BL_PRESERVE_BLANKS=YES works

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to connect to databases in SAS Viya

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.

Discussion stats
  • 7 replies
  • 1906 views
  • 0 likes
  • 3 in conversation