Uppercase constraint on Date Field

From: LizRHW <lizrhw_at_aol.com>
Date: 1997/03/19
Message-ID: <19970319055301.AAA10672_at_ladder01.news.aol.com>#1/1


[Quoted] [Quoted] I have inherited a database with many date fields having a constraint [Quoted] forcing upper case. This would seem to have no effect since there is not really a case associated with a date. However...

create table testtable (col1 date);
[Quoted] alter table testtable add constraint update check (col1=upper(col1));

insert into testtable values ('01-jan-97');

<this works fine, even though it is lower>

insert into testtable values (to_date('01-jan-1998','dd-mon-yyyy'));

<works fine>

insert into testtable values (to_date('01-jan-2000','dd-mon-yyyy'));

fails, with the uppercase constraint violated.

Any ideas (other than dropping the contraints...)?

Dan Received on Wed Mar 19 1997 - 00:00:00 CET

Original text of this message