Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Trigger question
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