How to treat NULLs as EMPTY_CLOBs/EMPTY_BLOBs
599032Jan 22 2008 — edited Feb 4 2008Hello All,
Thanks for looking into my mail.
I am writting an tool on top of oracle, through which application can insert data in BLOB columns.
My plan is to insert the BLOB columns always using LobLocators. i.e., if somebody tries to insert NULL value , then i will parser the query and convert that NULL value into EMPTY_BLOB() and then inserts into Oracle ( so that later, we can retrive the loblocator for the column).
But sometimes if application inserts "00" into a BLOB column, oracle is inserting NULL value into Oracle and later if somebody tries to retrive, lob locator, tool is crashing.
Now my question, is there any option i can set in oracle so that all NULLs will be treated as EMPTY_BLOB() in oracle...So that for me no need to parse the query.
insert into tableName values ('blob value'); -------- I can retrive Lob Locator later
insert into tableName values (EMPTY_BLOB())
------- Here alos i can retrive LobLocator later
insert into tableName values (NULL) ---------I can retrive LobLocator later.....I am handling in the tool and sending insert into tablename values (EMPTY_BLOB()) .
But if somebody executes
insert into tableName values ('00') ------------- It inserts NULL value and i am not able to retrive lobLocator because the data is not inserted using EMPTY_BLOB.
So my question, is there any way i can tell to oracle that please treat NULLs as EMPTY_BLOBs??
Thank you very much for your time,
Venkatesh.