DBA Data[Home] [Help]

APPS.OTA_ANT_SHD SQL Statements

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

Line: 47

    select
       announcement_id
      ,language
      ,source_lang
      ,announcement_title
      ,announcement_body
    from  ota_announcements_tl
    where announcement_id = p_announcement_id
    and   language = p_language;
Line: 114

    select
       announcement_id
      ,language
      ,source_lang
      ,announcement_title
      ,announcement_body
    from        ota_announcements_tl
    where       announcement_id = p_announcement_id
    and   language = p_language
    for update nowait;
Line: 181

  delete from OTA_ANNOUNCEMENTS_TL T
  where not exists
    (select NULL
    from OTA_ANNOUNCEMENTS B
    where B.ANNOUNCEMENT_ID = T.ANNOUNCEMENT_ID
    );
Line: 188

  update OTA_ANNOUNCEMENTS_TL T set (
      ANNOUNCEMENT_TITLE,
      ANNOUNCEMENT_BODY
    ) = (select
      B.ANNOUNCEMENT_TITLE,
      B.ANNOUNCEMENT_BODY
    from OTA_ANNOUNCEMENTS_TL B
    where B.ANNOUNCEMENT_ID = T.ANNOUNCEMENT_ID
    and B.LANGUAGE = T.SOURCE_LANG)
  where (
      T.ANNOUNCEMENT_ID,
      T.LANGUAGE
  ) in (select
      SUBT.ANNOUNCEMENT_ID,
      SUBT.LANGUAGE
    from OTA_ANNOUNCEMENTS_TL SUBB, OTA_ANNOUNCEMENTS_TL SUBT
    where SUBB.ANNOUNCEMENT_ID = SUBT.ANNOUNCEMENT_ID
    and SUBB.LANGUAGE = SUBT.SOURCE_LANG
    and (SUBB.ANNOUNCEMENT_TITLE <> SUBT.ANNOUNCEMENT_TITLE
      or SUBB.ANNOUNCEMENT_BODY <> SUBT.ANNOUNCEMENT_BODY
  ));
Line: 210

  insert into OTA_ANNOUNCEMENTS_TL (
    ANNOUNCEMENT_ID,
    ANNOUNCEMENT_TITLE,
    ANNOUNCEMENT_BODY,
    CREATED_BY,
    CREATION_DATE,
    LAST_UPDATE_DATE,
    LAST_UPDATED_BY,
    LAST_UPDATE_LOGIN,
    LANGUAGE,
    SOURCE_LANG
  ) select
    B.ANNOUNCEMENT_ID,
    B.ANNOUNCEMENT_TITLE,
    B.ANNOUNCEMENT_BODY,
    B.CREATED_BY,
    B.CREATION_DATE,
    B.LAST_UPDATE_DATE,
    B.LAST_UPDATED_BY,
    B.LAST_UPDATE_LOGIN,
    L.LANGUAGE_CODE,
    B.SOURCE_LANG
  from OTA_ANNOUNCEMENTS_TL B, FND_LANGUAGES L
  where L.INSTALLED_FLAG in ('I', 'B')
  and B.LANGUAGE = userenv('LANG')
  and not exists
    (select NULL
    from OTA_ANNOUNCEMENTS_TL T
    where T.ANNOUNCEMENT_ID = B.ANNOUNCEMENT_ID
    and T.LANGUAGE = L.LANGUAGE_CODE);