DBA Data[Home] [Help]

APPS.AD_MORG SQL Statements

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

Line: 14

  select organization_id
  from   hr_operating_units
  ,      fnd_product_groups
  where  product_group_id = 1
  and    multi_org_flag = 'Y'
  union
  select to_number(null)
  from   dual
  where not exists (
         select null
         from   fnd_product_groups
         where  multi_org_flag = 'Y')
  order by 1;
Line: 78

     select 'table exists',t.owner
     into   l_dummy,
            O_table_owner
     from   user_synonyms s,
            dba_tables    t
     where  s.synonym_name = upper(X_table_name)
       and  t.owner        = s.table_owner
       and  t.table_name   = s.table_name
       and  rownum = 1;
Line: 270

           select num_rows
             into l_num_rows
             from dba_tables
            where table_name = x_table_name
              and owner= l_table_owner;
Line: 401

    select distinct column_name, column_id
    from   all_tab_columns tc
    ,      user_synonyms   us
    where  us.synonym_name = X_table_name
    and    tc.table_name   = us.synonym_name
    and    tc.owner        = us.table_owner
    and    tc.column_name <> 'ORG_ID'
    and    tc.data_type not in ('LONG', 'LONG RAW')
    order by column_id;
Line: 412

    select c.column_name, pkc.primary_key_sequence
    from   fnd_columns             c
    ,      fnd_primary_key_columns pkc
    ,      fnd_primary_keys        pk
    ,      fnd_tables              t
    where  t.application_id   >= 0
    and    t.table_name        = X_table_name
    and    pk.application_id   = t.application_id
    and    pk.table_id         = t.table_id
    and    pk.primary_key_type = 'D'
    and    pkc.application_id  = pk.application_id
    and    pkc.table_id        = pk.table_id
    and    pkc.primary_key_id  = pk.primary_key_id
    and    c.application_id    = pkc.application_id
    and    c.table_id          = pkc.table_id
    and    c.column_id         = pkc.column_id
    and    c.column_name      <> 'ORG_ID'
    order by pkc.primary_key_sequence;
Line: 450

                  ' SELECT NULL FROM ' || X_table_name ||
                  ' WHERE NVL(ORG_ID, -99) = NVL(:X_target_org_id, -99)';
Line: 458

  statement := 'INSERT INTO ' || X_table_name || ' (' ||
               column_list || 'ORG_ID) SELECT ' ||
               column_list || ':X_target_org_id FROM ' || X_table_name || ' A' ||
               where_clause;
Line: 519

    select distinct column_name, column_id
    from   all_tab_columns tc
    ,      user_synonyms   us
    where  us.synonym_name = X_table_name
    and    tc.table_name   = us.synonym_name
    and    tc.owner        = us.table_owner
    and    tc.column_name <> 'ORG_ID'
    and    tc.data_type not in ('LONG', 'LONG RAW')
    order by column_id;
Line: 530

    select c.column_name, pkc.primary_key_sequence
    from   fnd_columns             c
    ,      fnd_primary_key_columns pkc
    ,      fnd_primary_keys        pk
    ,      fnd_tables              t
    where  t.application_id   >= 0
    and    t.table_name        = X_table_name
    and    pk.application_id   = t.application_id
    and    pk.table_id         = t.table_id
    and    pk.primary_key_type = 'D'
    and    pkc.application_id  = pk.application_id
    and    pkc.table_id        = pk.table_id
    and    pkc.primary_key_id  = pk.primary_key_id
    and    c.application_id    = pkc.application_id
    and    c.table_id          = pkc.table_id
    and    c.column_id         = pkc.column_id
    and    c.column_name      <> 'ORG_ID'
    order by pkc.primary_key_sequence;
Line: 571

      ' NOT IN (SELECT /*+ hash_aj parallel(b) */ ' || c_pk.column_name ||
      ', NVL(ORG_ID, -99) FROM ' || X_table_name || ' B)';
Line: 579

  in_line_view := ' (SELECT /*+ no_merge */ ORGANIZATION_ID FROM' ||
                  ' fnd_product_groups, hr_operating_units' ||
                  ' WHERE product_group_id = 1' ||
                  ' AND multi_org_flag = ''Y'' UNION' ||
                  ' SELECT TO_NUMBER(NULL) FROM DUAL WHERE NOT EXISTS' ||
                  ' (SELECT NULL FROM fnd_product_groups WHERE' ||
                  ' multi_org_flag = ''Y'')) V';
Line: 587

  statement := 'INSERT INTO ' || X_table_name || ' (' ||
               column_list || 'ORG_ID)' ||
               ' SELECT /*+ ordered  no_expand parallel(a) */ ' ||
               column_list || ' V.ORGANIZATION_ID FROM ' || X_table_name ||
               ' A,' || in_line_view || where_clause;
Line: 668

  select nvl(min(multi_org_flag),'N')
  into   is_org
  from   fnd_product_groups
  where  product_group_id = 1;
Line: 773

    table_list.DELETE;
Line: 774

    owner_list.DELETE;
Line: 775

    view_list.DELETE;
Line: 776

    appl_list.DELETE;
Line: 777

    seed_data.DELETE;
Line: 778

    conv_method.DELETE;
Line: 840

  add_list('AP_INV_SELECTION_CRITERIA_ALL'  , 'AP_INVOICE_SELECTION_CRITERIA'  , 'SQLAP' ,'N','N');
Line: 854

  add_list('AP_SELECTED_INVOICES_ALL'       , 'AP_SELECTED_INVOICES'           , 'SQLAP' ,'N','N');
Line: 855

  add_list('AP_SELECTED_INVOICE_CHECKS_ALL' , 'AP_SELECTED_INVOICE_CHECKS'     , 'SQLAP' ,'N','N');
Line: 1172

  add_list('JL_BR_AR_SELECT_ACCOUNTS_ALL'   , 'JL_BR_AR_SELECT_ACCOUNTS'       , 'JL'    ,'N','N');
Line: 1173

  add_list('JL_BR_AR_SELECT_CONTROLS_ALL'   , 'JL_BR_AR_SELECT_CONTROLS'       , 'JL'    ,'N','N');
Line: 1318

  add_list('PA_MASS_UPDATE_BATCHES_ALL'     , 'PA_MASS_UPDATE_BATCHES'         , 'PA'    ,'N','N');
Line: 1568

  select count(*)
  into   l_num_org
  from   hr_operating_units
  ,      fnd_product_groups
  where  product_group_id = 1
  and    multi_org_flag = 'Y';
Line: 1639

    select c.column_name, pkc.primary_key_sequence
    from   fnd_columns             c
    ,      fnd_primary_key_columns pkc
    ,      fnd_primary_keys        pk
    ,      fnd_tables              t
    where  t.application_id   >= 0
    and    t.table_name        = p_table
    and    pk.application_id   = t.application_id
    and    pk.table_id         = t.table_id
    and    pk.primary_key_type = 'D'
    and    pkc.application_id  = pk.application_id
    and    pkc.table_id        = pk.table_id
    and    pkc.primary_key_id  = pk.primary_key_id
    and    c.application_id    = pkc.application_id
    and    c.table_id          = pkc.table_id
    and    c.column_id         = pkc.column_id
    and    c.column_name      <> 'ORG_ID'
    order by pkc.primary_key_sequence;
Line: 1691

  statement := ' select '||''' '||''''||'||'||
                       nvl(pk_list, ''''||'no primary key'||'''')
                       ||' pk_value '||
               ' from  '||X_table||' a'||
               ' where org_id in (-3113, -3114)'||
               ' and decode(org_id, -3114, 1, '||X_num_org||') <> ( '||
               ' select count(*)'||
               ' from  '||X_table||' b'||
               ' where '||nvl(where_clause, '1=1 ')||
               ' and nvl(b.org_id, -99) not in (-3113, -3114)'||
               ') order by 1';