View previous topic :: View next topic
|
Author |
Message |
Prabha Warnings : 2 New User
Joined: 05 Dec 2005 Posts: 79
|
|
|
|
HI,
I am tryning to insert a null value into no null column. But it is shwoing me an error. Please tell how to insert a null value into not null column. |
|
Back to top |
|
|
MKP
New User
Joined: 23 Aug 2006 Posts: 12 Location: Chennai
|
|
|
|
Hi,
Use the NULL-INDICATOR to handle this condition.
move -1 to the indicator if the value is NUll.
In the embedded SQL statements we need to add this indiactor with the data host variable |
|
Back to top |
|
|
Prabha Warnings : 2 New User
Joined: 05 Dec 2005 Posts: 79
|
|
|
|
Thank u !!
What is the use of null indictor in select statement.?? Pls explain. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I am tryning to insert a null value into no null column. |
If the column is defined as NOT NULL you need to have the definition of the column changed to support NULL values.
If the design/definition specifies nulls are not allowed, why is there a need to put a null value in that column?
I suggest you talk with project lead or dba to determine how to proceed. |
|
Back to top |
|
|
vadivem
New User
Joined: 08 May 2006 Posts: 24 Location: pune
|
|
|
|
Prabha,
What dick has suggest it's exactly correct the reason behind the NOT NULL is based on data model(table definitions).
So interact with your DBA why its or what it's? |
|
Back to top |
|
|
fayazbashask
New User
Joined: 28 Jun 2007 Posts: 9 Location: Hyderabad
|
|
|
|
Hi,
anyway if the constraint has given as NOT NULL, you can't insert null values. Why can't you insert a default value for it?
Contact your DBA.....
Regards,
Fayaz |
|
Back to top |
|
|
|