Solved

will Oracle allow one to store a date of space/zero/null?

Posted on 2004-08-24
4
886 Views
Last Modified: 2008-01-09
will Oracle allow one to store a date of space/zero/null?
0
Comment
Question by:bolicat
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
pratikroy earned 125 total points
ID: 11880889
It will allow to store NULL in the date.
0
 
LVL 7

Expert Comment

by:bvanderveen
ID: 11880947
AS long as you don't have a NOT NULL constraint, you can update a column to null or leave it null when created.

Can't store zero or space, though.
0
 
LVL 9

Expert Comment

by:pratikroy
ID: 11880964
SQL> create table tab_dates (dt1 date);

Table created.

SQL> insert into tab_dates values to_date('00-00-00','DD-MM-YY');
insert into tab_dates values to_date('00-00-00','DD-MM-YY')
                             *
ERROR at line 1:
ORA-03001: unimplemented feature


SQL> insert into tab_dates values to_date('  -  -  ','DD-MM-YY');
insert into tab_dates values to_date('  -  -  ','DD-MM-YY')
                             *
ERROR at line 1:
ORA-03001: unimplemented feature


SQL> insert into tab_dates values (NULL);

1 row created.

SQL> insert into tab_dates values (sysdate);

1 row created.

SQL> select * from tab_dates;

DT1
---------

24-AUG-04

SQL> select * from tab_dates where dt1 is null;

DT1
---------


0
 
LVL 15

Expert Comment

by:andrewst
ID: 11880967
0 and space are meaningless in the context of a DATE column.  Sometimes people use a date like TO_DATE('01-JAN-0001','DD-MON-YYYY') as a kind of "zero" date.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now