Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> What's wrong with this picture?

What's wrong with this picture?

From: mark m <mockm_at_my-deja.com>
Date: Tue, 28 Dec 1999 21:27:13 GMT
Message-ID: <84b9h2$hcu$1@nnrp1.deja.com>


 I have a function...

create or replace function current_date  return date as

   the_date date;

 begin

   select sysdate
   into the_date
   from sys.dual;

   return (the_date);

 end;

...which when used in this constraint...

alter table fac_contracts
 add(constraint fcon_current_ck

     check (start_date < current_date and (end_date > current_date or end_date is null)));

...produces this error...

SQLWKS> alter table fac_contracts
     2>  add(constraint fcon_current_ck
     3>      check (start_date < current_date and (end_date >
current_date or end_date is null)));
     check (start_date < current_date and (end_date > current_date or
end_date is null)))
                                                      *
ORA-00904: invalid column name

What am I missing?

--

 mark m @ team health

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Dec 28 1999 - 15:27:13 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US