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: suggestions for maintaining master/child task list

Re: suggestions for maintaining master/child task list

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 02 May 2005 19:54:09 +0200
Message-ID: <84qc711drvm8mrpmq5hgoku125cn5ntu8s@4ax.com>


On Mon, 02 May 2005 16:51:06 GMT, "Jack Addington" <jaddington_at_shaw.ca> wrote:

>My guess is this is not a new chore and there are some good solutions out
>there. Right now I am thinking of something along the lines of
>
>1) On RowTrigger capture task_id / parent_task_id to tmp table
>2) On StatementTrigger process all tasks in tmp table and do the math.

No need for a temp table

issue 2 can be resolved by one update statement update <...parent>
set flagged = 'N'
where not exists
(select alll unflagged children)

issue 1 can definitely be resolved by a hierarchical select in embedded in a cursor for loop. But depending on version (which you of course don't mention), you would think it would be possible to update an inline view listing all the siblings that have to be updated.

--
Sybrand Bakker, Senior Oracle DBA
Received on Mon May 02 2005 - 12:54:09 CDT

Original text of this message

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