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

Home -> Community -> Usenet -> c.d.o.misc -> Trigger question

Trigger question

From: Keith S. <kshave_at_mbnet.mb.ca>
Date: Tue, 17 Nov 1998 14:22:08 GMT
Message-ID: <kEf42.1720$2A1.821@typhoon.mbnet.mb.ca>

   I have to write a trigger for table A which goes like this ...
>
> TABLE A
> id number
> seq number
> low number
> hi number
>
> TABLE B
> id number
> low number
> hi number
>
> Table A can have entries like
>
> 1,1,4,7 and 1,2,1,5.
>
> When Table A is changed (new row, update or delete) then the
> range of low and hi must be copied to Table B. In the example
> above, Table B should have values 1,1,7 for id,low and hi.
>
> If an update occurs, the minimum value of any low entries with
> matching id's in Table A must be written to Table B. The
> maximum value of any hi entries with matching id's in Table A
> must be written to Table B. For deletes, Table B must also be
> updated accordingly.
>
> How might I do this? (mutating table error seems to be the big
> problem in this case)

--
Keith Shave
Management Information Services
Ph: (204) 945-7937
Fax: (204) 948-2542 Received on Tue Nov 17 1998 - 08:22:08 CST

Original text of this message

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