DBA Data[Home] [Help]

APPS.OTA_UTILITY SQL Statements

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

Line: 73

select a.resubmit_interval,a.resubmit_end_date
 from fnd_concurrent_requests a, fnd_concurrent_programs b
 where a.concurrent_program_id =  b.concurrent_program_id
 and b.concurrent_program_name = p_name
 and b.application_id = 810
 and a.status_code ='I'
 and a.hold_flag ='N'
 and rownum=1
 order by a.request_id desc;
Line: 114

is select count(resource_booking_id)
from ota_resource_bookings
where event_id = peventid;
Line: 144

SELECT waav.text_value FROM WF_ACTIVITY_ATTR_VALUES WAAV
 WHERE WAAV.PROCESS_ACTIVITY_ID = (select max(instance_id) from
 wf_process_activities wpa where wpa.process_name =
'OTA_COMPETENCE_UPDATE_JSP_PRC'
 and  wpa.activity_name  = 'OTA_COMPETENCE_NOTIFY_APPROVAL'
 and  wpa.instance_label  = 'OTA_COMPETENCE_NOTIFY_APPROVAL'
and wpa.process_version =  wpa.process_version
and wpa.process_item_type = 'HRSSA' )
 AND  WAAV.NAME = 'HR_APPROVAL_REQ_FLAG' ;
Line: 156

 select text_default from wf_activity_attributes where NAME = 'HR_APPROVAL_REQ_FLAG'
 and activity_item_type = 'HRSSA'
 and activity_name  = 'OTA_COMPETENCE_NOTIFY_APPROVAL';
Line: 161

 select oav.competency_update_level from
 ota_activity_versions oav
 --, ota_offerings off
 where oav.activity_version_id = p_obj_id;
Line: 194

l_return_value := get_lookup_meaning('OTA_COMPETENCY_UPDATE_LEVEL',l_lookup_value,810);
Line: 212

is select count(event_id) from
ota_events where
parent_event_id = peventid and
           parent_event_id is not null;
Line: 359

select tav.version_name,
    evt.Title,
    evt.Course_Start_Date,
    evt.Course_End_Date,
       tdb.delegate_contact_id
From
   ota_Delegate_bookings tdb,
   ota_Events_vl evt, --MLS change _vl added
   ota_activity_versions_tl tav -- MLS change _tl added
Where
   evt.event_id = tdb.event_id and
   tdb.line_id = p_line_id and
      evt.activity_version_id = tav.activity_version_id;
Line: 377

Select full_name
From
    ota_customer_contacts_v
Where
    contact_id = l_contact_id;
Line: 385

Select
   tav.version_name,
   evt.title,
      evt.Course_Start_Date,
      evt.course_End_Date,
      evt.Maximum_Attendees
FROM ota_events_vl evt, -- MLS change _vl added
   ota_activity_versions_tl tav  --MLS change _tl added
WHERE evt.line_id = p_line_id and
      evt.activity_version_id = tav.activity_version_id;
Line: 397

select value
from v$parameter
where name ='nls_date_format';
Line: 565

SELECT
   invoicing_rule_id
FROM
   oe_order_lines_all
WHERE
   line_id = p_line_id;
Line: 633

SELECT Type
FROM OTA_BOOKING_STATUS_TYPES
WHERE booking_status_type_id = p_status_type_id;
Line: 691

Select null
FROM
OTA_DELEGATE_BOOKINGS
WHERE
Line_id = p_line_id;
Line: 755

Select null
FROM
OTA_EVENTS
WHERE
Line_id = p_line_id;
Line: 821

        select meaning
        from    hr_lookups
        where   lookup_type     = p_lookup_type
        and     lookup_code     = p_lookup_code
        and     enabled_flag = 'Y';
Line: 881

SELECT
   decode(invoiced_quantity,null,0,invoiced_quantity)
FROM
   oe_order_lines_all
WHERE
   line_id = p_line_id;
Line: 943

        SELECT null
     FROM wf_item_activity_statuses_v wf
     WHERE activity_name = p_activity
           AND activity_status_code = 'NOTIFIED'
           AND item_type = 'OEOL'
                 AND item_key = to_char(p_line_id);
Line: 988

    select bst.type
    from ota_delegate_bookings db,
         ota_booking_status_types bst,
         ota_events ev,
         ota_events evt
    where db.delegate_person_id = p_delegate_person_id
      and db.booking_status_type_id = bst.booking_status_type_id
      and bst.type <> g_cancelled_booking
      and db.event_id = ev.event_id
      and evt.event_id = p_event_id
      and ev.event_id <> p_event_id
      and ((
           ev.course_start_date = ev.course_end_date and
           evt.course_start_date = evt.course_end_date and
           ev.course_start_date = evt.course_start_date and
           nvl(evt.course_start_time, '-99:99') <= nvl(ev.course_end_time, '99:99') and
           nvl(evt.course_end_time, '99:99') >= nvl(ev.course_start_time, '-99:99')
          )
      or  (
           (ev.course_start_date <> ev.course_end_date or
           evt.course_start_date <> evt.course_end_date) and
           ev.course_start_date <= evt.course_end_date and
           ev.course_end_date >= evt.course_start_date
          ))
    order by bst.type;
Line: 1015

    select bst.type
    from ota_delegate_bookings db,
         ota_booking_status_types bst,
         ota_events ev,
         ota_events evt
    where db.delegate_contact_id = p_delegate_contact_id
      and db.booking_status_type_id = bst.booking_status_type_id
      and bst.type <> g_cancelled_booking
      and db.event_id = ev.event_id
      and evt.event_id = p_event_id
      and ev.event_id <> p_event_id
      and ev.course_start_date <= evt.course_end_date
      and ev.course_end_date >= evt.course_start_date
      order by bst.type;
Line: 1112

SELECT bg.name
  FROM hr_all_organization_units org,
     hr_all_organization_units bg
 WHERE org.business_group_id = bg.organization_id
   AND org.organization_id = p_organization_id;
Line: 1272

SELECT lookup.meaning   Dm_Name,
       catusg.category  Dm_Code
  FROM ota_act_cat_inclusions actcat,
       ota_category_usages catusg,
       hr_lookups lookup
 WHERE actcat.category_usage_id=  catusg.category_usage_id
   AND actcat.primary_flag='Y'
   AND catusg.category = lookup.lookup_code
   AND lookup.lookup_type ='ACTIVITY_CATEGORY'
   AND catusg.type='DM'
   AND actcat.activity_version_id = p_activity_version_id;
Line: 1285

SELECT lookup.meaning   dm_name,
       catusg.category  dm_code
  FROM ota_act_cat_inclusions actcat,
       ota_category_usages catusg,
       hr_lookups lookup
 WHERE actcat.category_usage_id=  catusg.category_usage_id
   AND catusg.category = lookup.lookup_code
   AND lookup.lookup_type ='ACTIVITY_CATEGORY'
   AND catusg.type='DM'
   AND actcat.activity_version_id = p_activity_version_id;
Line: 1299

SELECT meaning
  FROM hr_lookups
 WHERE lookup_type ='ACTIVITY_CATEGORY'
   AND lookup_code = 'INCLASS';
Line: 1369

select ocu.category
from ota_category_usages_tl ocu , ota_offerings oaf
where oaf.delivery_mode_id = ocu.category_usage_id
and oaf.offering_id = p_offering_id
and ocu.Language = USERENV('LANG');
Line: 1412

   SELECT COUNT(booking_id)
   INTO l_num_waitlisted
   FROM ota_delegate_bookings tdb
   WHERE tdb.event_id = p_event_id
     AND tdb.booking_status_type_id IN (SELECT bst.booking_status_type_id
                                        FROM ota_booking_status_types bst
                                        WHERE bst.type = 'W');
Line: 1456

 SELECT tdb.booking_id
   FROM ota_delegate_bookings tdb,
        ota_booking_status_types bst
  WHERE tdb.booking_status_type_id = bst.booking_status_type_id
    AND bst.type = 'W'
    AND tdb.event_id = p_event_id
  ORDER BY tdb.date_booking_placed;
Line: 1465

 SELECT tdb.booking_id
   FROM ota_delegate_bookings tdb,
        ota_booking_status_types bst
  WHERE tdb.booking_status_type_id = bst.booking_status_type_id
    AND bst.type = 'W'
    AND tdb.event_id = p_event_id
  ORDER BY tdb.booking_priority,
           tdb.booking_id;
Line: 1532

SELECT s.location_id
  FROM ota_suppliable_resources s,
       ota_resource_bookings r
 WHERE r.supplied_resource_id = s.supplied_resource_id
   AND r.event_id = p_event_id
   AND primary_venue_flag = 'Y';
Line: 1541

SELECT e.location_id,
       e.training_center_id
  FROM ota_events e
 WHERE e.event_id = p_event_id;
Line: 1551

SELECT o.location_id
  FROM hr_all_organization_units o
 WHERE o.organization_id = p_training_center_id;
Line: 1618

SELECT employee_id
  FROM fnd_user
 WHERE user_id = fnd_profile.value('USER_ID');
Line: 1684

   SELECT DECODE(per.last_name, NULL, NULL, per.last_name)||
          DECODE(per.title, NULL, DECODE(per.first_name, NULL, NULL, ', '), ', '||per.title)||
     --Modified for Bug#2997820
          --DECODE(per.first_name,NULL,NULL, per.last_name) full_name
          DECODE(per.first_name,NULL,NULL, per.first_name) full_name
   FROM   per_all_people_f per, fnd_user u
   WHERE  per.person_id = u.employee_id
     AND  (per.effective_end_date >= DECODE(p_course_end_date, NULL, TRUNC(SYSDATE), p_course_end_date) AND
           per.effective_start_date <= DECODE(p_course_start_date, NULL, TRUNC(SYSDATE), p_course_start_date))
     AND  u.user_id = p_authorizer_id;
Line: 1695

  SELECT  decode(fnd_profile.value('BEN_DISPLAY_EMPLOYEE_NAME'),'FN',per.full_name,
                  per.first_name||' '|| per.last_name||' '||per.suffix) FULL_NAME
   FROM per_all_people_f per, fnd_user u
   WHERE per.person_id = u.employee_id
   AND u.user_id = p_authorizer_id
   AND trunc(SYSDATE) between per.effective_start_date and per.effective_end_date;
Line: 1871

SELECT lookup.meaning   Dm_Name,
       catusg.category  Dm_Code
  FROM ota_act_cat_inclusions actcat,
       ota_category_usages catusg,
       hr_lookups lookup
 WHERE actcat.category_usage_id=  catusg.category_usage_id
   AND actcat.primary_flag='Y'
   AND catusg.category = lookup.lookup_code
   AND lookup.lookup_type ='ACTIVITY_CATEGORY'
   AND catusg.type='C'
   AND actcat.activity_version_id = p_activity_version_id;
Line: 1884

SELECT lookup.meaning   dm_name,
       catusg.category  dm_code
  FROM ota_act_cat_inclusions actcat,
       ota_category_usages catusg,
       hr_lookups lookup
 WHERE actcat.category_usage_id=  catusg.category_usage_id
   AND catusg.category = lookup.lookup_code
   AND lookup.lookup_type ='ACTIVITY_CATEGORY'
   AND catusg.type='C'
   AND actcat.activity_version_id = p_activity_version_id;
Line: 1956

    SELECT count(*)
    FROM   ota_offerings
    WHERE  learning_object_id = p_learning_object_id;
Line: 1994

    SELECT count(*)
    FROM   ota_offerings
    WHERE  activity_version_id = p_activity_version_id;
Line: 2032

    SELECT rco_id
    FROM   ota_activity_versions
    WHERE  activity_version_id = p_activity_version_id;
Line: 2074

    SELECT count(event_id)
    FROM   ota_events
    WHERE  parent_offering_id = p_offering_id and
           offering_id is not null;
Line: 2080

    SELECT count(event_id)
    FROM   ota_events
    WHERE  parent_offering_id = p_offering_id and
           event_type in ('SELFPACED','SCHEDULED') and
           book_independent_flag = 'N';
Line: 2127

    SELECT count(*)
    FROM   ota_question_banks
    WHERE  folder_id = p_folder_id;
Line: 2148

  SELECT DECODE(BST.type,'C','Y',BST.type) status, BST.name
  FROM   ota_booking_status_types_vl BST,
         ota_delegate_bookings ODB
  WHERE  ODB.event_id = p_event_id
  AND    (p_delegate_person_id IS NOT NULL AND ODB.delegate_person_id = p_delegate_person_id
            OR p_delegate_contact_id IS NOT NULL and ODB.delegate_contact_id = p_delegate_contact_id)
  AND    ODB.booking_status_type_id = BST.booking_status_type_id
  ORDER BY status;
Line: 2193

select
p.full_name person_name
from per_people_f p
where
p.person_id = p_user_id
and sysdate between p.effective_start_date and p.effective_end_date;
Line: 2201

select
p.party_name person_name
from  hz_parties p
where
p.party_id  = p_user_id;
Line: 2232

select
p.full_name person_name
from per_people_f p , fnd_user fus
where p.person_id = fus.employee_id
and
fus.user_id = p_user_id;
Line: 2262

select pap.full_name from per_all_people_f pap
where  pap.person_id = p_person_id
       and trunc(sysdate) between nvl(pap.effective_start_date, trunc(sysdate))
       and nvl(pap.effective_end_date, trunc(sysdate));
Line: 2268

SELECT
    SUBSTRB( PARTY.PERSON_LAST_NAME,1,50) || ' ' ||
    SUBSTRB( PARTY.PERSON_FIRST_NAME,1,40) || ' ' ||
    HR_GENERAL.DECODE_AR_LOOKUP('CONTACT_TITLE',nvl(PARTY.PERSON_PRE_NAME_ADJUNCT,PARTY.PERSON_TITLE)) LEARNER_NAME
FROM
    HZ_CUST_ACCOUNT_ROLES ACCT_ROLE,
    HZ_PARTIES PARTY,
    HZ_RELATIONSHIPS REL,
    HZ_CUST_ACCOUNTS ROLE_ACCT
WHERE
    ACCT_ROLE.PARTY_ID = REL.PARTY_ID
AND ACCT_ROLE.ROLE_TYPE = 'CONTACT'
AND REL.SUBJECT_ID = PARTY.PARTY_ID
AND REL.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
AND REL.OBJECT_TABLE_NAME = 'HZ_PARTIES'
AND ROLE_ACCT.PARTY_ID = REL.OBJECT_ID
AND ACCT_ROLE.CUST_ACCOUNT_ID = ROLE_ACCT.CUST_ACCOUNT_ID
AND ACCT_ROLE.CUST_ACCOUNT_ID = l_customer_id
AND ACCT_ROLE.CUST_ACCOUNT_ROLE_ID = p_contact_id;
Line: 2328

select ACCT_ROLE.cust_account_id CUSTOMER_ID
from  HZ_CUST_ACCOUNT_ROLES acct_role,
      HZ_PARTIES party,
      HZ_RELATIONSHIPS rel,
      HZ_ORG_CONTACTS org_cont,
      HZ_PARTIES rel_party,
      HZ_CUST_ACCOUNTS role_acct
where acct_role.party_id = rel.party_id
   and acct_role.role_type = 'CONTACT'
   and org_cont.party_relationship_id = rel.relationship_id
   and rel.subject_id = party.party_id
   and rel.party_id = rel_party.party_id
   and rel.subject_table_name = 'HZ_PARTIES'
   and rel.object_table_name = 'HZ_PARTIES'
   and acct_role.cust_account_id = role_acct.cust_account_id
   and role_acct.party_id	= rel.object_id
   and ACCT_ROLE.cust_account_role_id = p_contact_id;
Line: 2366

select name from hr_all_organization_units_tl
where  language = userenv('LANG') and organization_id = p_organization_id;
Line: 2370

select substrb(party.party_name,1,50)
from   hz_parties party
      ,hz_cust_accounts cust_acct
where
      cust_acct.party_id = party.party_id
and   cust_acct.cust_account_id = l_customer_id;
Line: 2424

select nvl(parent_cat_usage_id,-1)
        from ota_category_usages
        where category_usage_id = current_cat_usage_id;
Line: 2461

select nvl(parent_learning_object_id,-1)
        from ota_learning_objects
        where learning_object_id  = current_lo_id;
Line: 2467

select folder_id
        from ota_learning_objects
        where learning_object_id = current_lo_id;
Line: 2473

select nvl(parent_folder_id,-1)
        from ota_lo_folders
        where folder_id = current_folder_id;
Line: 2590

SELECT event_status from ota_events
where
event_id = p_event_id;
Line: 2625

SELECT  ppt.system_person_type
  FROM    per_all_people_f per,
          per_person_type_usages_f ptu,
          per_person_types ppt
  WHERE
         per.person_id = p_person_id
  AND    ptu.person_id = per.person_id
  AND    ppt.business_group_id = per.business_group_id
  AND    ptu.person_type_id = ppt.person_type_id
  AND    trunc(sysdate) between per.effective_start_date AND per.effective_end_date
  AND    trunc(sysdate) between ptu.effective_start_date AND ptu.effective_end_date
  AND ppt.system_person_type <> 'APL'
  AND ppt.system_person_type in ('EMP','CWK');
Line: 2684

select party.party_id
from  HZ_CUST_ACCOUNT_ROLES acct_role,
      HZ_PARTIES party,
      HZ_RELATIONSHIPS rel,
      HZ_ORG_CONTACTS org_cont,
      HZ_PARTIES rel_party,
      HZ_CUST_ACCOUNTS role_acct
where acct_role.party_id = rel.party_id
   and acct_role.role_type = 'CONTACT'
   and org_cont.party_relationship_id = rel.relationship_id
   and rel.subject_id = party.party_id
   and rel.party_id = rel_party.party_id
   and rel.subject_table_name = 'HZ_PARTIES'
   and rel.object_table_name = 'HZ_PARTIES'
   and acct_role.cust_account_id = role_acct.cust_account_id
   and role_acct.party_id	= rel.object_id
   and ACCT_ROLE.cust_account_role_id = p_delegate_contact_id;
Line: 2722

  SELECT null
  FROM ota_events
  WHERE event_id = p_class_id
    --AND trunc(sysdate) between enrolment_start_date and nvl(enrolment_end_date, trunc(sysdate))
    AND ota_timezone_util.convert_date(sysdate, to_char(sysdate,'HH24:MI'), ota_timezone_util.get_server_timezone_code, timezone)
       BETWEEN to_date(to_char(nvl(enrolment_start_date,trunc(sysdate)),'YYYY/MM/DD') || ' ' || '00:00' , 'YYYY/MM/DD HH24:MI')
       AND to_date(to_char(nvl(enrolment_end_date,to_date('4712/12/31','YYYY/MM/DD')),'YYYY/MM/DD') || ' ' || '23:59', 'YYYY/MM/DD HH24:MI')
    AND event_type IN ('SCHEDULED', 'SELFPACED')
    AND event_status IN ('N', 'P', 'F');
Line: 2750

   SELECT null
   FROM ota_learning_paths
   WHERE learning_path_id = p_learning_path_id
    AND trunc(sysdate) between start_date_active and nvl(end_date_active, trunc(sysdate));
Line: 2756

  SELECT null
  from ota_lp_sections lpc,
     ota_learning_path_members lpm
  where lpc.learning_path_id = p_learning_path_id
  and lpc.learning_path_section_id = lpm.learning_path_section_id
  and lpc.completion_type_code in ('M','S');
Line: 2791

   SELECT null
   FROM ota_certifications_b crb
     , ota_certification_members crm
   WHERE crb.certification_id = crm.certification_id
     AND crb.certification_id = p_certification_id
     AND trunc(sysdate) between crb.start_date_active and nvl(crb.end_date_active, trunc(sysdate))
     -- Added for bug#4617609, modified for 4940007
     and ((crb.renewable_flag = 'N' and trunc(sysdate) <= nvl( crb.INITIAL_COMPLETION_DATE ,trunc(sysdate)))
          or crb.renewable_flag = 'Y');
Line: 3239

 SELECT null
 FROM ota_event_associations
 WHERE event_id = p_event_id
  AND customer_id IS NOT NULL;
Line: 3267

  SELECT NULL
  FROM per_all_assignments_f
  WHERE person_id = p_person_id
    AND trunc(sysdate) between effective_start_date and effective_end_date
    AND organization_id = p_sponsor_org_id
    AND assignment_type in ('E', 'C', 'A');
Line: 3293

  SELECT l.lookup_code
    FROM fnd_lookup_values l
  WHERE l.lookup_type = 'ENROLMENT_STATUS_REASON'
   AND l.meaning = p_meaning
   AND l.enabled_flag = 'Y'
   and rownum=1;
Line: 3303

   SELECT bsh.comments
    FROM ota_booking_status_histories bsh
  WHERE bsh.booking_id = p_booking_id
   AND bsh.start_date =
    (SELECT MAX(start_date)
     FROM ota_booking_status_histories
     WHERE booking_id = p_booking_id);
Line: 3312

  SELECT meaning
  FROM hr_lookups
  WHERE lookup_type = 'ENROLMENT_STATUS_REASON'
   AND enabled_flag = 'Y'
   AND lookup_code = p_lookup_code;
Line: 3362

  select name
   from ota_natural_languages_v
   where language_code  = p_language_code;