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 -> Trigger question

Trigger question

From: Keith S. <kshave_at_mbnet.mb.ca>
Date: 1998/11/10
Message-ID: <Y2_12.345$aO5.256@typhoon.mbnet.mb.ca>#1/1

  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 10 1998 - 00:00:00 CST

Original text of this message

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