Skip to Main Content

SQL & PL/SQL

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!

Insert a space into a NOT NULL column

362039Jan 4 2004 — edited Jan 6 2004
Hi,
I am trying to run a C program in which I am inserting a space character into a database table, where the column has been defined as �not null�.
I am initialising a variable defined in C as: char stream, with a blank but after running the insert statement I get an error: ORA-01400: cannot insert NULL into �. .

My options are: char_map=charz, code=ANSI_C, mode=ANSI.

I understand that if I was using char_map = VARCHA2, on input - if the input value contains nothing but blanks Oracle treats it like a null, but I am not using VARCHAR2 option, but CHARZ.
I tried STRING and other options and I cannot get this to work.

Is there a way where I can insert a space character into a table which has a constraint of �not null� while using C type variables?

I would appreciated any help on this.
Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 3 2004
Added on Jan 4 2004
8 comments
734 views