Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: New Check Constraint Condition Question...
In article <37DA9467.194226C6_at_baynet.net>,
Stephen Hurrell <hurrells_at_baynet.net> wrote:
>
> --------------34A5B448F364EF595BC6645E
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> >
>
> Hello
>
> First off I'd like to thanks everyone who respond to my first
constraint
> question.
> The solution that I chose was;
>
> event_year = to_char(event_date,'YYYY')
>
> However the trigger approach may become applicable.
>
> Anyways I now what to know if you can use sysdate in a calculation.
>
> I have two fields "age" and "birth_date" that are related as;
>
> age = yearof(sysdate)-yearof(birth_date)
>
> QUestions;
>
> 1. Can I use sysdate here or like this?
> 2. There are Y2K issues with the above
>
> Any ideas?
> STeve
> ----EOT
Hello
You can not use SysDate in a check constraint. I am pasting here all the
limitations associated with the check constraint. (This is from Oracle 8
manual)
Cheers
Owais
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Sun Sep 12 1999 - 02:45:34 CDT
![]() |
![]() |