DBA Data[Home] [Help]

APPS.OKC_REPORT_PVT SQL Statements

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

Line: 157

      select USER_PROFILE_OPTION_NAME
      from fnd_profile_options_vl
      where application_id=510
      and PROFILE_OPTION_NAME = p_profile_option;
Line: 183

      select SQL_ID from (
       select SQL_ID, XST_ID
       from OKC_REPORT_XST
       connect by ID = prior XST_ID
       start with ID = fnd_profile.value('OKC_WEB_REPORT')
     ) where SQL_ID is not NULL;
Line: 208

      select XSL_ID
      from OKC_REPORT_XST
     where ID = fnd_profile.value('OKC_WEB_REPORT');
Line: 242

      select name, help_text
      from okc_report_sql_v
      where id = p_sql;
Line: 278

      select name, help_text
      from okc_report_xsl_v
      where id = p_xsl;
Line: 350

    select V.MAJOR_VERSION, V.MINOR_VERSION
    from
      okc_k_vers_numbers_v V
    where V.CHR_ID = pp_chr_id
      and (pp_major_version is NULL or pp_major_version = V.MAJOR_VERSION)
    union all
    select pp_major_version, max(H.MINOR_VERSION) MINOR_VERSION
    from okc_k_vers_numbers_v V1,
      OKC_K_VERS_NUMBERS_H H
    where V1.CHR_ID = pp_chr_id
	  and H.CHR_ID = pp_chr_id
          and H.MAJOR_VERSION = pp_major_version
	  and H.MAJOR_VERSION <> V1.MAJOR_VERSION
    ;
Line: 402

	--'I' - inserted empty, or old and obsolete; locked
Line: 411

      select S.CACHE_YN, S.LAST_UPDATE_DATE, S.id SQL_ID
      from OKC_REPORT_SQL_V S, OKC_REPORT_XST T
      where T.id = p_xid and T.sql_id = S.id
      and sysdate between S.start_date and nvl(S.end_date,sysdate);
Line: 421

      select '!'
      from
        okc_report_xml_v M
      where M.CHR_ID = pp_chr_id
      and M.MAJOR_VERSION = pp_major_version
      and M.MINOR_VERSION = pp_minor_version
      and M.SQL_ID = pp_sql_id
      and M.LAST_UPDATE_DATE > pp_sql_date
      and M.XML_TEXT is not NULL
    ;
Line: 436

      select M.XML_TEXT
      from
        okc_report_xml_v M
      where M.CHR_ID = pp_chr_id
      and M.MAJOR_VERSION = pp_major_version
      and M.MINOR_VERSION = pp_minor_version
      and M.SQL_ID = pp_sql_id
      and M.LAST_UPDATE_DATE > pp_sql_date
      and M.XML_TEXT is not NULL
    ;
Line: 490

        delete from okc_report_xml M
        where M.CHR_ID = G_kid
          and M.MAJOR_VERSION = G_vid
          and M.LANGUAGE = userenv('LANG')
          and M.SQL_ID = l_sql_id
          ;
Line: 498

    insert into okc_report_xml
         (	CHR_ID
		,MAJOR_VERSION
		,LANGUAGE
		,SQL_ID
		,MINOR_VERSION
		,XML_TEXT
		,CREATED_BY
		,CREATION_DATE
		,LAST_UPDATED_BY
		,LAST_UPDATE_DATE
		,LAST_UPDATE_LOGIN
	    ) values
	    (	G_kid,
		G_vid,
		userenv('LANG'),
		l_sql_id,
		G_mid,
		empty_clob(),
		fnd_global.user_id,
		sysdate,
		fnd_global.user_id,
		sysdate,
		fnd_global.login_id
	    );
Line: 523

    select XML_TEXT into x_xml_text
    from okc_report_xml
    where CHR_ID = G_kid
	and MAJOR_VERSION = G_vid
	and LANGUAGE = userenv('LANG')
	and SQL_ID = l_sql_id
    for update of XML_TEXT nowait;
Line: 554

    cursor last_update_csr(p_xst number) is
	select greatest(
		max(S.LAST_UPDATE_DATE),
		max(Q.LAST_UPDATE_DATE),
		max(T.LAST_UPDATE_DATE)) d
	from
	  (select SQL_ID, XSL_ID, LAST_UPDATE_DATE
	   from OKC_REPORT_XST
	   connect by ID = prior XST_ID
	   start with ID = p_xst) T,
	  OKC_REPORT_XSL_V S,
	  OKC_REPORT_SQL_V Q
	where T.XSL_ID = S.ID
	and T.SQL_ID = Q.ID (+);
Line: 569

    open last_update_csr(p_xst_id);
Line: 570

    fetch last_update_csr into l_date;
Line: 571

    close last_update_csr;
Line: 600

	--'I' - inserted empty, or old and obsolete; locked
Line: 608

      select T.CACHE_YN
      from OKC_REPORT_XST_V T, OKC_REPORT_XSL_V L
      where T.id = p_xst
      and T.XSL_ID = L.ID
      and sysdate between L.start_date and nvl(L.end_date,sysdate);
Line: 620

      select '!'
      from
        okc_report_htm_v H
      where H.CHR_ID = pp_chr_id
      and H.MAJOR_VERSION = pp_major_version
      and H.MINOR_VERSION = pp_minor_version
      and H.XST_ID = pp_xst_id
      and H.SCN_ID = pp_scn_id
      and H.LAST_UPDATE_DATE > pp_xst_date
      and H.HTM_TEXT is not NULL
    ;
Line: 637

      select H.HTM_TEXT
      from
        okc_report_htm_v H
      where H.CHR_ID = pp_chr_id
      and H.MAJOR_VERSION = pp_major_version
      and H.MINOR_VERSION = pp_minor_version
      and H.XST_ID = pp_xst_id
      and H.SCN_ID = pp_scn_id
      and H.LAST_UPDATE_DATE > pp_xst_date
      and H.HTM_TEXT is not NULL
    ;
Line: 694

        delete from okc_report_htm H
        where H.CHR_ID = G_kid
          and H.MAJOR_VERSION = G_vid
          and H.LANGUAGE = userenv('LANG')
          and H.XST_ID = G_xid
          and H.SCN_ID = 0
          ;
Line: 706

    insert into okc_report_htm
    (	CHR_ID
	,MAJOR_VERSION
	,LANGUAGE
	,XST_ID
	,SCN_ID
	,MINOR_VERSION
	,HTM_TEXT
	,CREATED_BY
	,CREATION_DATE
	,LAST_UPDATED_BY
	,LAST_UPDATE_DATE
	,LAST_UPDATE_LOGIN
    ) values
    (	G_kid,
	G_vid,
	userenv('LANG'),
	G_xid,
	0,
	G_mid,
	empty_clob(),
	fnd_global.user_id,
	sysdate,
	fnd_global.user_id,
	sysdate,
	fnd_global.login_id
    );
Line: 733

    select HTM_TEXT into x_htm_text
    from okc_report_htm
    where CHR_ID = G_kid
	and MAJOR_VERSION = G_vid
	and LANGUAGE = userenv('LANG')
	and XST_ID = G_xid
	and SCN_ID = 0
    for update of HTM_TEXT nowait;
Line: 816

    select '!' from okc_k_headers_b
    where id=p_kid;
Line: 820

	select '!'
	from
	  okc_report_xst X,
	  okc_report_prm_v P
	where X.ID = p_xid
	and P.sql_id = X.sql_id
	and P.code not in ('xid', 'kid', 'vid', 'content_type');
Line: 919

  select to_char(id) from okc_k_headers_b
  where contract_number = p_kn;
Line: 1007

      select value
      from NLS_SESSION_PARAMETERS
      where PARAMETER=param;
Line: 1076

    select lower(host_name)||'_'||lower(instance_name)||'.dbc' into l_dbc
    from v$instance;
Line: 1091

    select wf_mail.URLENCODE(value) into l_value
    from NLS_SESSION_PARAMETERS
    where PARAMETER='NLS_LANGUAGE';
Line: 1097

    select wf_mail.URLENCODE(value) into l_value
    from NLS_SESSION_PARAMETERS
    where PARAMETER='NLS_TERRITORY';
Line: 1296

      select '!'
      from OKC_K_HEADERS_TL
      where ID = p_chr_id
	and LANGUAGE = userenv('LANG')
      for update of last_update_date, last_updated_by
      nowait;
Line: 1332

    update OKC_K_HEADERS_TL
    set last_updated_by = fnd_global.user_id,
	last_update_date = sysdate+1/144
    where ID = p_chr_id
	and LANGUAGE = userenv('LANG');
Line: 1368

      select '!'
      from OKC_K_HEADERS_TL
      where ID = p_chr_id
	and LANGUAGE = userenv('LANG')
	and last_updated_by = fnd_global.user_id
        and last_update_date > sysdate
      for update of last_update_date
      nowait;
Line: 1416

      select name from okc_report_sql_v
      where id=p_sql;
Line: 1419

      select name from okc_report_xsl_v
      where id=p_xsl;
Line: 1465

      select
        'XSL' TEMPLATE_TYPE,
        S.NAME TEMPLATE_NAME
      from
        ( select XSL_ID,SQL_ID
          from OKC_REPORT_XST
          connect by ID = prior XST_ID
          start with ID = fnd_profile.value('OKC_WEB_REPORT')) T,
        OKC_REPORT_XSL_V S
      where T.XSL_ID = S.ID
        and  not(sysdate between S.START_DATE and NVL(S.END_DATE,sysdate))
      union all
      select
        'SQL' TEMPLATE_TYPE,
        Q.NAME TEMPLATE_NAME
      from
        ( select XSL_ID,SQL_ID
          from OKC_REPORT_XST
          connect by ID = prior XST_ID
          start with ID = fnd_profile.value('OKC_WEB_REPORT')) T,
        OKC_REPORT_SQL_V Q
       where T.SQL_ID = Q.ID
         and  not(sysdate between Q.START_DATE and NVL(Q.END_DATE,sysdate))
     ;
Line: 1490

       select '"'||USER_PROFILE_OPTION_NAME||'"'
       from fnd_profile_options_vl
       where application_id=510
         and PROFILE_OPTION_NAME = 'OKC_WEB_REPORT'
     ;
Line: 1498

       select '!'
       from OKC_REPORT_XST T, OKC_REPORT_XSL_V L
       where T.ID = fnd_profile.value('OKC_WEB_REPORT')
       and T.XSL_ID = L.ID;
Line: 1627

  select id
  from okc_k_articles_v
  where dnz_chr_id = p_chr
  and chr_id = p_chr
  minus
  SELECT SC.cat_id id
  from okc_section_contents_v SC
  WHERE SC.scn_id in
    (SELECT id
    from okc_sections_b
    connect by prior id = scn_id
    start with chr_id = p_chr
    and scn_id is NULL);
Line: 1686

    select '!'
    from okc_sections_v
    where CHR_ID = p_chr
  ;
Line: 1694

    select '!'
    from okc_k_lines_v
    where CHR_ID = p_chr
    ;
Line: 1746

    cursor sql_csr is select name from okc_report_sql_v
                 where id=p_sql_id;
Line: 1780

        select NVL(max(id),10000)+1 into l_n
        from okc_report_sql_b
        where id between 10001 and 20000-1;
Line: 1784

        select NVL(max(id),10000)+1 into l_n
        from okc_report_xsl_b
        where id between 10001 and 20000-1;
Line: 1788

        select NVL(max(id),10000)+1 into l_n
        from okc_report_xst
        where id between 10001 and 20000-1;
Line: 1807

  select name
  from okc_report_sql_v
  where nvl(end_date,sysdate)>=sysdate
  group by name
  having count(1)>1;
Line: 1813

  select name
  from okc_report_xsl_v
  where nvl(end_date,sysdate)>=sysdate
  group by name
  having count(1)>1;
Line: 1853

       select T.SQL_ID
       from OKC_REPORT_XST T, OKC_REPORT_XSL_V L
       where T.ID = fnd_profile.value('OKC_WEB_REPORT')
       and T.XSL_ID = L.ID;
Line: 1886

    select code,
      prompt,
      type,
      required_yn,
      lov_query,
      OKC_PARAMETERS_PUB.get(code) value
    from OKC_REPORT_PRM_V
    where sql_id = p
    order by sequence_num;
Line: 1960

          open c2 for 'select 1 a from ('||r.lov_query||') where id = :1' using r.value;
Line: 1984

            'select 1 a from ('||r.lov_query||') where id = :1 and name=:2'
          using r.value, nv;
Line: 1994

            'select id from ('||r.lov_query||') where name=:2'
          using nv;
Line: 2003

            'select id from ('||r.lov_query||') where name like :2'
          using nv;
Line: 2055

    select replace(prompt,'<',fnd_global.local_chr(38)||'lt;'), lov_query
Line: 2061

    select replace(MEANING,'<',fnd_global.local_chr(38)||'lt;') from fnd_lookups
Line: 2065

    select replace(MEANING,'<',fnd_global.local_chr(38)||'lt;') from fnd_lookups
Line: 2069

    select replace(description,'<',fnd_global.local_chr(38)||'lt;') from fnd_lookups
Line: 2118

    select HTM_TEXT
    from okc_report_htm_v
    where CHR_ID = pp_kid
    and MAJOR_VERSION = pp_vid
    and XST_ID = pp_xid;
Line: 2155

    select
	Contract_number||
	decode(Contract_number_modifier,NULL,NULL,' - ')||
	Contract_number_modifier
    from okc_k_headers_b
    where id = k;
Line: 2163

    select
      S.NAME
    from okc_report_xst T,
      okc_report_sql_v Q,
      okc_report_xsl_v S
    where T.id = x
      and T.sql_id = Q.id
      and T.xsl_id = S.id;
Line: 2255

    select
	  MAJOR_VERSION
    from OKC_K_VERS_NUMBERS_V
    where CHR_ID = k;
Line: 2302

    select
	Contract_number
	,Contract_number_modifier
    from okc_k_headers_b
    where id = k;
Line: 2312

    select
      Q.NAME NAME,
      S.NAME DESCRIPTION
    from okc_report_xst T,
      okc_report_sql_tl Q,
      okc_report_xsl_tl S
    where T.id = x
      and T.sql_id = Q.id
      and T.xsl_id = S.id
      and Q.LANGUAGE = userenv('LANG')
      and S.LANGUAGE = userenv('LANG')
      ;