DBA Data[Home] [Help]

APPS.CN_SALES_HIER_PUB SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 6

  G_LAST_UPDATE_DATE          DATE    := sysdate;
Line: 7

  G_LAST_UPDATED_BY           NUMBER  := fnd_global.user_id;
Line: 10

  G_LAST_UPDATE_LOGIN         NUMBER  := fnd_global.login_id;
Line: 64

     SELECT distinct cg.name comp_group_name, cscg.comp_group_id comp_group_id
     FROM
       cn_srp_comp_groups_v cscg,
       cn_comp_groups cg
     WHERE
       ((l_salesrep_id = -9999 ) OR (cscg.salesrep_id = l_salesrep_id)) AND
       cscg.comp_group_id = l_comp_group_id AND
       cscg.start_date_active <= l_date and
       ((cscg.end_date_active is null) OR
       (cscg.end_date_active >= l_date)) AND
       cg.comp_group_id = cscg.comp_group_id ;
Line: 87

     SELECT
       cs.name mgr_name,
       cs.employee_number mgr_number,
       cscg.role_name mgr_role,
       cscg.start_date_active mgr_start_date,
       cscg.end_date_active mgr_end_date

     FROM
       cn_srp_comp_groups_v cscg,
       cn_salesreps cs
     WHERE
       cscg.comp_group_id = l_comp_group_id AND -- (master-detail passed in value)
       ((cscg.end_date_active is null) OR
       (cscg.end_date_active >= l_date)) AND
       cscg.manager_flag = 'Y' AND
       cscg.salesrep_id = cs.salesrep_id;
Line: 113

     SELECT
       cs.name srp_name ,
       cs.employee_number srp_number,
       cscg.role_name srp_role,
       cscg.start_date_active srp_start_date,
       cscg.end_date_active srp_end_date
     FROM
       cn_srp_comp_groups_v cscg,
       cn_salesreps cs
     WHERE
       cscg.comp_group_id = l_comp_group_id AND -- (master-detail passed value)
       cscg.salesrep_id = cs.salesrep_id AND
       cscg.start_date_active <= l_date AND
       ((cscg.end_date_active is null) OR
       (cscg.end_date_active >= l_date));
Line: 138

     SELECT
       hier.comp_group_id group_id, cg.name group_name
     FROM
       cn_comp_group_hier hier,
       cn_comp_groups cg
     WHERE
       hier.parent_comp_group_id = l_comp_group_id and
       hier.comp_group_id = cg.comp_group_id and
       delete_flag <> 'Y' and
       hier.start_date_active <= l_date and
       ((hier.end_date_active is null) or
       (hier.end_date_active >= l_date));
Line: 179

   x_loading_status := 'CN_INSERTED';