• Jeff,

    Sorry for the late reply,

    continuation of the above topic...

    As you asked, the below is one of the update statements we are using in stored procedure

    Update de_norm_buscard_attr

    set fax=(select fax from view_a x

    where x.contractid in ( select pcm_child.contract_id from table_a pcm

    inner join table_b pra on pcm.pcm_role_id=pra.pra_role_id

    INNER JOIN table_c y ON pra.p_phn_id=y.p_phn_id

    inner join table_d pris on pcm.pcm_role_id = pris.parent_role_instance_id

    inner join table_a pcm_child on pris.role_instance_id = pcm_child.pcm_role_id

    where (y.lst_updt_dtm >=@lst_updt_tm OR pra.lst_updt_dtm >=@lst_updt_tm))

    and x.contractid=de_norm_buscard_attr.contract_id)

    where contract_id in ( select pcm_child.contract_id from table_a pcm

    inner join table_b pra on pcm.pcm_role_id=pra.pra_role_id

    INNER JOIN table_c y ON pra.p_phn_id=y.p_phn_id

    inner join table_d pris on pcm.pcm_role_id = pris.parent_role_instance_id

    inner join table_a pcm_child on pris.role_instance_id = pcm_child.pcm_role_id

    where (y.lst_updt_dtm >=@lst_updt_tm OR pra.lst_updt_dtm >=@lst_updt_tm))