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 -> Re: create assertion?

Re: create assertion?

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 09 Sep 2002 16:40:24 GMT
Message-ID: <3D7CCECD.53500D62@exesolutions.com>

eugene kim wrote:

> is there an equivalent of 'create assertion' in oracle?
> or do i have to get around with triggers?
>
> desired assertion is like this
> ------------
> no team may play two games in two different places on the same day..
> ------------
> this is how i'm trying..
>
> create or replace trigger assertion_on_game
> before insert or update on games
> for each row
> begin
> if exists ( select home_team_id
> from teams t
> where t.home_team_id = :new.visitor_team_id or -- inserted
> visitor team has game in home city
> t.visitor_team_id = :new.home_team_id and -- inserted home
> team has game in visitor city
> game_date = :new.game_date) then
> <don't update or insert>
> end if;
> end;
> /
>
> thank you

Any chance you could translate the word ASSERTION into Oracle. I haven't a clue what you are talking about and I would expect most people are thinking the same thing.

Daniel Morgan Received on Mon Sep 09 2002 - 11:40:24 CDT

Original text of this message

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