Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DB2 to Oracle: DEFAULT value for BLOB attribute

user15004Aug 23 2006 — edited May 11 2011
The DEFAULT constraint in DB2 is converted by Oracle Migration Workbench (OMWB) as follows:

ALTER TABLE ADMIN.REQ MODIFY (BAAGE DEFAULT "SYSIBM"."BLOB"(''));

This fails with the following message:
Failed to create default for Table :ADMIN.REQ; ORA-02262: ORA-4044 occurs while type-checking column default value expression

Using the following works, but fails when DEFAULT is inserted into the table:
ALTER TABLE ADMIN.REQ MODIFY (BAAGE DEFAULT TO_BLOB(''));

ORA2: REPUSER4> INSERT INTO ADMIN.REQ VALUES(1, 1, 1, 1, 1, SYSDATE, 1, DEFAULT, DEFAULT, DEFAULT, DEFAULT);
INSERT INTO ADMIN.REQ VALUES(1, 1, 1, 1, 1, SYSDATE, 1, DEFAULT, DEFAULT, DEFAULT, DEFAULT)
*
ERROR at line 1:
ORA-01400: cannot insert NULL into ("ESPADMIN"."REQ"."BAAGE")


ORA2: REPUSER4>

I want to make the default for the column as 'blank space'. So, I need to have the hex number for the same set as default for the column definition. I tried '0x255', however, it fails with invalid hex number. How can I resolve this?

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2011
Added on Aug 23 2006
4 comments
10,106 views