Nested Triggers and Concurrency

  • Folks,

    Im creating an asp.net budgeting app for marketing folks.

    Basically budgets are assigned at different levels in a heirarchy. activity->project->category->department->Quarterly.

    A change in a budget at any level will cause updates to the budget actuals of all the above levels. Im doing this through update triggers e.g

    CREATE TRIGGER [category_update_trigger] ON [dbo].[category]

    FOR UPDATE

    AS

    declare @category_total_budget as money

    select @category_total_budget = (select sum(c.budget_actual) from department d join category c on d.department_record_id = c.department_ref_id where

    c.department_ref_id =(select department_ref_id from inserted))

    update department set budget_actual = @category_total_budget where department.department_record_id = (

    select department_ref_id from inserted)

    So a change ripples up through all the budget actuals up to quarterly budget.

    Theres about 14 users. I'd say only 3 or 4 will be using this at any one time and there is only about 180 PO's a qtr. Im worried about concurrency, but I dont want to overdo it. Any suggestions?

    Cheers

    Mick

    Edited by - kali_mist on 11/22/2002 06:49:17 AM

  • This was removed by the editor as SPAM

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply