Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-08-24
4
Medium Priority
?
910 Views
Last Modified: 2008-01-09
will Oracle allow one to store a date of space/zero/null?
0
Comment
Question by:bolicat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
pratikroy earned 500 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
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 information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

670 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