Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2014

    Unanswered: how to update a sum value to other table for all rows

    please please any one can help me ?

    I have table named ;

    structured as below;

    bmccode char(10) NOT NULL,
    c_partno char(30) references semicomponents,
    ext_stock_date date,
    c_weight_per_piece numeric(10),
    c_rate_per_piece numeric(10,2),
    ext_ob_kg numeric(10,2),
    ext_rec_kg numeric(10,2),
    ext_rej_kg numeric(10,2),
    ext_iss_kg numeric(10,2),
    ext_cb_kg numeric(10,2),
    ext_ob_pcs numeric(10,2),
    ext_rec_pcs numeric(10,2),
    ext_rej_pcs numeric(10,2),
    ext_iss_pcs numeric(10,2),
    ext_cb_pcs numeric(10,2),
    ext_ob_value numeric(10,2),
    ext_rec_value numeric(10,2),
    ext_rej_value numeric(10,2),
    ext_iss_value numeric(10,2),
    ext_cb_value numeric(10,2)

    & I have other 2 tables

    Extrusion_production_master & extrusion_production_detail

    extrusion_production_master (
    ext_prod_id numeric(10) primary key,
    RM_type char(10),
    ext_input_kg numeric(10,3),
    c_produced_kgs numeric(10,3),
    c_produced_value numeric(10,3),
    c_rej_kgs numeric(10,3),
    c_shortexcess_kgs numeric(10,3),
    emp_id numeric(10) references employees)

    extrusion_production_detail (
    ext_prod_id numeric(10) references extrusion_production_master,
    c_partno char(30) references semicomponents,
    c_produced_pcs numeric(10),
    c_weight_per_piece numeric(10),
    c_rate_per_piece numeric(10,2),
    c_produced_kgs numeric(10,3),
    c_produced_value numeric(10,2),
    c_rej_kgs numeric(10,3),
    c_shortexcess_kgs numeric(10,3),
    c_produced_value numeric(10,3),
    c_rej_value numeric(10,3),
    c_shortexcess_value numeric(10,3)

    If I update any value in particular rows in extrusion_production_detail
    immediately the extrusionstock table's ext_rec_kg to be updated automatically.

    how to handle this by trigger or how to handle this in oracle form level?


  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    generally speaking it is a Bad Design to store computed value in static table.
    computed value should be calculated upon demand when it is queried.
    I choose to decline to assist you in facilitating & perpetuating this flawed implementation.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts