DBA Data[Home] [Help]

APPS.OTA_TDB_BUS2 SQL Statements

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

Line: 44

    select 'X'
    from per_addresses
    where person_id = p_person_id
      and address_id = p_address_id;
Line: 103

  Select type
  from
  (
   select  bst.TYPE
         ,ota_timezone_util.convert_date(ev.course_start_date, ev.course_start_time, ev.timezone, evt.timezone) ev_course_start_date
	 ,ota_timezone_util.convert_date(ev.course_end_date, nvl(ev.course_end_time,'23:59'), ev.timezone, evt.timezone) ev_course_end_date
	 ,evt.course_start_date evt_course_start_date
	 ,decode(evt.course_start_date, NULL, NULL, nvl(evt.course_start_time,'00:00')) evt_course_start_time
	 ,evt.course_end_date evt_course_end_date
	 ,decode(evt.course_end_date, NULL, NULL, nvl(evt.course_end_time,'23:59'))  evt_course_end_time
    from ota_delegate_bookings db,
         ota_booking_status_types bst,
         ota_events ev,
         ota_events evt
    where (   (p_delegate_contact_id IS NULL AND db.delegate_person_id = p_delegate_person_id
           OR (p_delegate_person_id IS NULL AND 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.event_type <>'SELFPACED' -- Added for Bug 2241280
  )
  Where
          (
           ((trunc(ev_course_start_date) = trunc(ev_course_end_date) and
           evt_course_start_date = evt_course_end_date and
           trunc(ev_course_start_date) = evt_course_start_date) or
           (
           (trunc(ev_course_start_date) <> trunc(ev_course_end_date) or
           evt_course_start_date <> evt_course_end_date) and
           (trunc(ev_course_start_date) <= evt_course_end_date and
           trunc(ev_course_end_date) >= evt_course_start_date)
           ))
            AND
           (
           (((nvl(evt_course_start_time, '-99:99')
             >  nvl(to_char(ev_course_start_date,'HH24:MI'), '99:99') and
            nvl(evt_course_start_time, '-99:99') <
           nvl(to_char(ev_course_end_date,'HH24:MI'), '99:99'))) OR
           ((nvl(evt_course_end_time, '99:99')
             > nvl(to_char(ev_course_start_date,'HH24:MI'), '99:99') and
           nvl(evt_course_end_time, '99:99') <
            nvl(to_char(ev_course_end_date,'HH24:MI'), '99:99'))) OR
           ((nvl(to_char(ev_course_end_date,'HH24:MI'), '99:99') >
           nvl(evt_course_start_time, '-99:99') and
           nvl(to_char(ev_course_end_date,'HH24:MI'), '99:99') <
           nvl(evt_course_end_time, '-99:99'))) OR
          ((nvl(to_char(ev_course_start_date,'HH24:MI'), '99:99') >
           nvl(evt_course_start_time, '-99:99') and
           nvl(to_char(ev_course_start_date,'HH24:MI'), '99:99') <
           nvl(evt_course_end_time, '-99:99')))) OR
           ((nvl(evt_course_end_time, '-99:99') =
                      nvl(to_char(ev_course_end_date,'HH24:MI'), '-99:99') and
            nvl(evt_course_start_time, '-99:99') =
                      nvl(to_char(ev_course_start_date,'HH24:MI'), '-99:99')))
          )
          )
    order by type;
Line: 167

      SELECT evt.event_type
      FROM OTA_EVENTS evt
      WHERE evt.event_id= p_event_id;
Line: 240

    select nvl(overdraft_limit,0)
    from   ota_booking_deals
    where  booking_deal_id = p_booking_deal_id;
Line: 356

    select 1
    from   per_all_people_f
    where  person_id = l_person_id
    and    business_group_id = p_business_group_id;
Line: 365

    select 1
    from   per_assignments_f
    where  assignment_id = l_assignment_id
    and    business_group_id = p_business_group_id;
Line: 373

    select 1
    from   hr_all_organization_units
    where  organization_id = p_organization_id
    and    business_group_id = p_business_group_id;
Line: 508

    select 1
    from HZ_LOCATIONS loc,
         HZ_CUST_ACCT_SITES acct_site,
         HZ_PARTY_SITES party_site
     where PARTY_SITE.location_id = LOC.location_id
           and ACCT_SITE.party_site_id = PARTY_SITE.party_site_id
           and ACCT_SITE.CUST_ACCOUNT_ID = p_customer_id
           and ACCT_SITE.CUST_ACCT_SITE_ID  = p_contact_address_id
           AND DECODE(fnd_profile.value('OTA_HR_GLOBAL_BUSINESS_GROUP_ID'),
                  null, (NVL(ORG_ID , NVL(TO_NUMBER(DECODE(SUBSTRB( USERENV('CLIENT_INFO'),1,1),' ',
                            NULL, SUBSTRB( USERENV('CLIENT_INFO'),1,10))),
                            -99))), 1 ) =
               DECODE(fnd_profile.value('OTA_HR_GLOBAL_BUSINESS_GROUP_ID'),
                  null, (NVL(TO_NUMBER(DECODE(SUBSTRB( USERENV('CLIENT_INFO'),1,1),' ',
                            NULL,SUBSTRB(USERENV( 'CLIENT_INFO'),1,10))),
                            -99)),1 );
Line: 627

    select price_basis
    from ota_events
    where event_id = p_event_id;
Line: 693

    select course_start_date
    from ota_events
    where event_id = p_event_id;
Line: 700

    select effective_start_date, effective_end_date
    from per_all_people_f
    where person_id = p_delegate_person_id
    and trunc(p_date_booking_placed)
    between effective_start_date
    and     nvl(effective_end_date,hr_api.g_eot);
Line: 708

    select effective_start_date, effective_end_date
    from per_all_people_f
    where person_id = p_sponsor_person_id
    and p_date_booking_placed
    between effective_start_date
    and     nvl(effective_end_date,hr_api.g_eot);
Line: 812

    select 1

     from     HZ_CUST_ACCOUNT_ROLES ACCT_ROLE,
              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_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
           AND ACCT_ROLE.CUST_ACCOUNT_ID = p_customer_id;
Line: 830

    select 1

     from HZ_CUST_ACCOUNT_ROLES ACCT_ROLE,
          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_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_sponsor_contact_id
           AND ACCT_ROLE.CUST_ACCOUNT_ID = p_customer_id;
Line: 902

SELECT OLD_EVENT_ID,DAEMON_TYPE
FROM  OTA_DELEGATE_BOOKINGS
WHERE
BOOKING_ID = p_booking_id;
Line: 917

         fnd_message.set_name('OTA', 'OTA_13905_UPDATE_EVENT_FAILURE');
Line: 944

    IS SELECT course_end_date
  FROM ota_events
 WHERE event_id = p_event_id;
Line: 981

SELECT org.name,
       org.organization_id,
       loc.country,
       loc.location_id
  FROM hr_all_organization_units_tl org,
       hr_all_organization_units org1,
       hr_locations_all loc
 WHERE org.organization_id = org1.organization_id
   AND loc.location_id(+) = org1.location_id
   AND org.language = USERENV('LANG')
   AND org1.organization_id = p_om_org_id;
Line: 994

SELECT loc.country
  FROM hr_locations_all loc
 WHERE loc.location_id = ota_utility.get_event_location(p_event_id);