DBA Data[Home] [Help]

APPS.HZ_DNB_HIERARCHY_PVT SQL Statements

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

Line: 59

select 'Y'
from hz_relationships
where subject_id = p_subject_id
      and object_id = p_object_id
      and actual_content_source = 'DNB'
      and relationship_type = p_relationship_type
      and (end_date is null
        or end_date > sysdate)  ;
Line: 100

    SELECT subject_id, start_date
    FROM hz_relationships
    WHERE relationship_code = 'PARENT_OF'
        and relationship_type = p_relationship_type
        and actual_content_source = 'DNB'
        and object_id = p_subject_id
        and object_id <> subject_id
        and (end_date is null
        or end_date > sysdate) ;
Line: 131

    SELECT subject_id
    FROM hz_relationships
    WHERE relationship_code = 'PARENT_OF'
        and relationship_type = p_relationship_type
        and actual_content_source = 'DNB'
        and object_id = p_subject_id
        and object_id <> subject_id
        and (end_date is null
        or end_date > sysdate) ;
Line: 161

    SELECT subject_id, start_date
    FROM hz_relationships
    WHERE relationship_code = 'HEADQUARTERS_OF'
        and relationship_type = p_relationship_type
        and actual_content_source = 'DNB'
        and object_id = p_subject_id
        and object_id <> subject_id
        and (end_date is null
        or end_date > sysdate) ;
Line: 192

    SELECT subject_id
    FROM hz_relationships
    WHERE relationship_code = 'HEADQUARTERS_OF'
        and relationship_type = p_relationship_type
        and actual_content_source = 'DNB'
        and object_id = p_subject_id
        and object_id <> subject_id
        and (end_date is null
        or end_date > sysdate) ;
Line: 221

    SELECT subject_id, start_date
    FROM hz_relationships
    WHERE relationship_code = 'DOMESTIC_ULTIMATE_OF'
        and relationship_type = p_relationship_type
        and actual_content_source = 'DNB'
        and object_id = p_subject_id
        and (end_date is null
        or end_date > sysdate)  ;
Line: 251

    SELECT subject_id
    FROM hz_relationships
    WHERE relationship_code = 'DOMESTIC_ULTIMATE_OF'
        and relationship_type = p_relationship_type
        and actual_content_source = 'DNB'
        and object_id = p_subject_id
        and (end_date is null
        or end_date > sysdate)  ;
Line: 278

    SELECT subject_id, start_date
    FROM hz_relationships
    WHERE relationship_code = 'GLOBAL_ULTIMATE_OF'
        and relationship_type = p_relationship_type
        and actual_content_source = 'DNB'
        and object_id = p_subject_id
        and (end_date is null
        or end_date > sysdate)  ;
Line: 306

    SELECT subject_id
    FROM hz_relationships
    WHERE relationship_code = 'GLOBAL_ULTIMATE_OF'
        and relationship_type = p_relationship_type
        and actual_content_source = 'DNB'
        and object_id = p_subject_id
        and (end_date is null
        or end_date > sysdate)  ;
Line: 333

    SELECT subject_id
    FROM hz_relationships
    WHERE relationship_code = 'SUBSIDIARY_OF'
        and relationship_type = p_relationship_type
        and actual_content_source = 'DNB'
        and object_id = p_subject_id
        and object_id <> subject_id
        and (end_date is null
        or end_date > sysdate) ;
Line: 360

    SELECT subject_id
    FROM hz_relationships
    WHERE relationship_code = 'DIVISION_OF'
        and relationship_type = p_relationship_type
        and actual_content_source = 'DNB'
        and object_id = p_subject_id
        and object_id <> subject_id
        and (end_date is null
        or end_date > sysdate)  ;
Line: 389

    SELECT object_id
    FROM hz_relationships
    WHERE relationship_type = p_relationship_type
         and (relationship_code = 'GLOBAL_SUBSIDIARY_OF'
         or relationship_code = 'DOMESTIC_SUBSIDIARY_OF'
         or relationship_code = 'DIVISION_OF'
         or relationship_code = 'SUBSIDIARY_OF')
         and actual_content_source = 'DNB'
         and subject_id = p_subject_id
         and (end_date is null
         or end_date > sysdate)  ;
Line: 422

select 'Y'
from hz_relationships
where subject_id = p_subject_id
      and relationship_type = 'DNB_HIERARCHY'
      and rownum = 1
      and (end_date is null
        or end_date > sysdate)  ;
Line: 455

select 'Y'
from hz_relationships
where subject_id = gup_subject_id
      and relationship_type = 'DNB_HIERARCHY'
      and rownum = 1
      and (end_date is null
        or end_date > sysdate)  ;
Line: 488

select 'Y'
from hz_relationships
where object_id = p_subject_id
      and relationship_code = 'HEADQUARTERS_OF'
      and relationship_type = 'DNB_HIERARCHY'
      and (end_date is null
        or end_date > sysdate)  ;
Line: 521

select 'Y'
from hz_relationships
where object_id = p_subject_id
      and relationship_code = 'PARENT_OF'
      and relationship_type = 'DNB_HIERARCHY'
      and (end_date is null
        or end_date > sysdate)  ;
Line: 555

select 'Y'
from hz_relationships
where subject_id = p_subject_id
      and object_id = gup_subject_id
      and relationship_code = 'GLOBAL_SUBSIDIARY_OF'
      and relationship_type = 'DNB_HIERARCHY'
      and (end_date is null
        or end_date > sysdate)  ;
Line: 590

select 'Y'
from hz_relationships
where subject_id = p_subject_id
      and relationship_code = 'DOMESTIC_SUBSIDIARY_OF'
      and relationship_type = 'DNB_HIERARCHY'
      and (end_date is null
        or end_date > sysdate)  ;
Line: 624

select 'Y'
from hz_relationships
where subject_id = p_subject_id
      and relationship_code = 'GLOBAL_ULTIMATE_OF'
      and relationship_type = 'DNB_HIERARCHY'
      and (end_date is null
        or end_date > sysdate)  ;
Line: 657

select 'Y'
from hz_relationships
where subject_id = p_subject_id
      and relationship_type = p_relationship_type
      and relationship_code = 'GLOBAL_ULTIMATE_OF'
      and (end_date is null
        or end_date > sysdate)  ;
Line: 691

select 'Y'
from hz_relationships
where subject_id = p_subject_id
      and relationship_type = p_relationship_type
      and relationship_code = 'DOMESTIC_ULTIMATE_OF'
      and (end_date is null
        or end_date > sysdate)  ;
Line: 724

    select hl.country from
    hz_locations hl, hz_party_sites hps
    where hl.location_id=hps.location_id
    and hps.party_id = p1;
Line: 748

    select relationship_id
    from hz_relationships
    where subject_id = p_subject_id
    and relationship_type = p_relationship_type
    and object_id = p_object_id
    and relationship_code = p_relationship_code ;
Line: 913

   SELECT object_version_number INTO x_object_version_number
   FROM   hz_relationships
   WHERE  relationship_id = x_relationship_id
   AND    subject_table_name = 'HZ_PARTIES'
   AND    object_table_name = 'HZ_PARTIES'
   AND    directional_flag = 'F';
Line: 925

    hz_relationship_v2pub.update_relationship ('T', x_relationship_rec,
                    x_object_version_number, x_party_object_version_number,x_return_status, x_msg_count, x_msg_data );
Line: 1013

select 'Y'
from hz_relationships
where subject_id = p_subject_id
      and actual_content_source = 'DNB'
      and relationship_type = 'DNB_HIERARCHY'
      and (relationship_code = 'GLOBAL_SUBSIDIARY_OF'
         or relationship_code = 'DOMESTIC_SUBSIDIARY_OF'
         or relationship_code = 'DIVISION_OF'
         or relationship_code = 'SUBSIDIARY_OF')
      and (end_date is null
        or end_date > sysdate)  ;
Line: 1061

select 'Y'
from hz_relationships
where subject_id = p_subject_id
      and object_id = gup_subject_id
      and actual_content_source = 'DNB'
      and relationship_type = 'DNB_HIERARCHY'
      and (relationship_code = 'GLOBAL_SUBSIDIARY_OF'
         or relationship_code = 'DOMESTIC_SUBSIDIARY_OF'
         or relationship_code = 'DIVISION_OF'
         or relationship_code = 'SUBSIDIARY_OF')
      and (end_date is null
        or end_date > sysdate)  ;
Line: 1107

select subject_id, relationship_code
from hz_relationships
where object_id = p_subject_id
      and actual_content_source = 'DNB'
      and relationship_type = 'DNB_HIERARCHY'
      and (relationship_code = 'GLOBAL_SUBSIDIARY_OF'
         or relationship_code = 'DOMESTIC_SUBSIDIARY_OF'
         or relationship_code = 'DIVISION_OF'
         or relationship_code = 'SUBSIDIARY_OF')
      and (end_date is null
        or end_date > sysdate)  ;
Line: 1425

select subject_id
from hz_relationships rel
where rel.actual_content_source = 'DNB'
  and rel.relationship_type in ( 'PARENT/SUBSIDIARY' , 'HEADQUARTERS/DIVISION' )
  and rel.relationship_code in ( 'SUBSIDIARY_OF' , 'DIVISION_OF' )
  and ( rel.end_date is null
     or rel.end_date > sysdate )
  and rel.object_table_name='HZ_PARTIES'
  and rel.object_type='ORGANIZATION'
  and rel.subject_table_name='HZ_PARTIES'
  and rel.subject_type='ORGANIZATION'
  and rel.directional_flag in ('F','B')
  and rel.status='A'
  and not exists ( select 1
              from hz_relationships
              where relationship_type in ( 'PARENT/SUBSIDIARY' , 'HEADQUARTERS/DIVISION' )
                and relationship_code in ( 'PARENT_OF' , 'HEADQUARTERS_OF' )
                and subject_table_name='HZ_PARTIES'
                and subject_type='ORGANIZATION'
                and ( end_date is null
                   or end_date > sysdate )
                and actual_content_source = 'DNB'
                and status='A'
		and subject_id=rel.subject_id);
Line: 1521

select rel.subject_id
from hz_relationships rel
where rel.actual_content_source = 'DNB'
  and rel.relationship_code in ( 'SUBSIDIARY_OF' , 'DIVISION_OF' )
  and ( rel.end_date is null
     or rel.end_date > sysdate )
  and rel.object_table_name='HZ_PARTIES'
  and rel.object_type='ORGANIZATION'
  and rel.subject_table_name='HZ_PARTIES'
  and rel.subject_type='ORGANIZATION'
  and rel.directional_flag in ('F','B')
  and not exists ( select 1
              from hz_relationships
              where relationship_code in ( 'PARENT_OF' , 'HEADQUARTERS_OF' )
                and subject_table_name='HZ_PARTIES'
                and subject_type='ORGANIZATION'
                and ( end_date is null
                   or end_date > sysdate )
                and actual_content_source = 'DNB'
                and subject_id=rel.subject_id );