Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Date field as 'NULL'

Former Member
0 Likes
2,920

Hi!

I want to insert a 'NULL' value in date field in database.

If I leave the field blank it inserts '00000000'.

If I specify a space, it inserts ' / / '

How do I insert null for Date. Other programs pick up this Null value, so I want to insert it as Null only.

Thanks.

Edited by: Nikhil DOZ on Aug 26, 2008 10:58 PM

Hi!

I want to insert a 'NULL' value in date field in database.

If I leave the field blank it inserts '00000000'.

If I specify a space, it inserts ' / / '

How do I insert null for Date. Other programs pick up this Null value, so I want to insert it as Null only.

Thanks.

Edited by: Nikhil DOZ on Aug 26, 2008 10:58 PM

4 REPLIES 4
Read only

Former Member
0 Likes
1,667

initial value for date is '00000000'.

Read only

0 Likes
1,667

I want it stored as NULL, because there is another program which check date = NULL in select statement.

How can I do this?

Read only

Former Member
0 Likes
1,667

Hi,

Try to have the char datatype for that date field to have the NULL value. Have the lenght of the field as CHAR(8) or CHAR(10) for your requirement. Here we can have spaces ot NULL as the field value.

We cant have NULL value for the field whose datatype is of DATE or DATS type. This is posible in Oracle and other databases.

Regards

Lekha

Read only

karan007
Product and Topic Expert
Product and Topic Expert
0 Likes
1,667

Hi,

my_element->set_attribute_null(

EXPORTING

name = `<Attribute_Name>` ).