Return-Path: <oracle-l-bounce@freelists.org>
X-Original-To: oracle-l@orafaq.com
Delivered-To: oracle-l@orafaq.com
Received: from puck1183.startdedicated.com (localhost [127.0.0.1])
 by puck1183.startdedicated.com (Postfix) with ESMTP id 1D9931960726
 for <oracle-l@orafaq.com>; Fri,  9 Sep 2016 21:31:20 +0200 (CEST)
Received: from turing.freelists.org (turing.freelists.org [206.53.239.180])
 by puck1183.startdedicated.com (Postfix) with ESMTPS
 for <oracle-l@orafaq.com>; Fri,  9 Sep 2016 21:31:19 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B25922CB35;
 Fri,  9 Sep 2016 15:31:18 -0400 (EDT)
X-Virus-Scanned: Debian amavisd-new at turing.freelists.org
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 8HOi7RWnA88K; Fri,  9 Sep 2016 15:31:18 -0400 (EDT)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id C37E52CB41;
 Fri,  9 Sep 2016 15:31:05 -0400 (EDT)
Received: with ECARTIS (v1.0.0; list oracle-l); Fri, 09 Sep 2016 15:29:44 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id EF86F2C9DB
 for <oracle-l@freelists.org>; Fri,  9 Sep 2016 15:29:43 -0400 (EDT)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id rLboXhP9XpKv for <oracle-l@freelists.org>;
 Fri,  9 Sep 2016 15:29:43 -0400 (EDT)
Received: from mail-yw0-f169.google.com (mail-yw0-f169.google.com [209.85.161.169])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id B79BB2C92A
 for <oracle-l@freelists.org>; Fri,  9 Sep 2016 15:29:43 -0400 (EDT)
Received: by mail-yw0-f169.google.com with SMTP id g192so53287110ywh.1
        for <oracle-l@freelists.org>; Fri, 09 Sep 2016 12:29:43 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date
         :message-id:mime-version:thread-index:content-language;
        bh=IBj7Q7jdSgfnTmBIsowohm1sz9gNzd85EuxJ6o7rk5w=;
        b=PDcQq4r1JMcRvbtKOdaDjoLRo6FMjrdbJCOhnQpg+9kWgO8hdZ8rlc5OPD++HtO0Pl
         IEqF+utnCTDtMpgYPewpaKrN9fGmKWsSG5T/OKIwjsKf+7AJxwjZDDswwaQplR94oXLy
         /cRyeTEvqu/SRJiqcjiWoSXe39S9gORCaZIbyDK0DMOWqwVxzk9Y+GxuGwsotV9rih2W
         p0F4/olzuyV3k0uWG2iuYu9TVa3G65/OaSFVa9fmGVuR1Ym8M2g/ObBQ/vSgeE6BkRin
         mf3UG4/mk1kBPKFdPkySSQ13q2YvmxRfqVt3kIBEZqIc1/cVa75Ee+IS217RJQcff0GZ
         UciQ==
X-Gm-Message-State: AE9vXwNyMrCdz+YYRdB7nu235j5Od4vuKNvcf5A/+0sXT+TxIAIL2Gdqn0AJgYg2oXX2wg==
X-Received: by 10.13.192.131 with SMTP id b125mr4687908ywd.161.1473449383099;
        Fri, 09 Sep 2016 12:29:43 -0700 (PDT)
Received: from KenPC10 (c-76-110-164-226.hsd1.fl.comcast.net. [76.110.164.226])
        by smtp.gmail.com with ESMTPSA id z123sm1687071ywf.49.2016.09.09.12.29.41
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 09 Sep 2016 12:29:42 -0700 (PDT)
From: "Ken Naim" <kennethnaim@gmail.com>
To: "'Chris Taylor'" <christopherdtaylor1994@gmail.com>
Cc: "'Ryan January'" <rjanuary@gmail.com>,
 "'Oracle-l Digest Users'" <oracle-l@freelists.org>
References: <014001d20ac9$7de464f0$79ad2ed0$@gmail.com> <F16FB730-377A-4504-8B64-11F5B9205384@gmail.com> <014701d20aca$f085ae50$d1910af0$@gmail.com> <CAP79kiSUXsR037TjnL5x7_7q0uhW5-pEKN+P_vVEq15miNajDA@mail.gmail.com>
In-Reply-To: <CAP79kiSUXsR037TjnL5x7_7q0uhW5-pEKN+P_vVEq15miNajDA@mail.gmail.com>
Subject: RE: missing part of sql statement in v$sql
Date: Fri, 9 Sep 2016 15:29:39 -0400
Message-ID: <016301d20ad0$837abca0$8a7035e0$@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="----=_NextPart_000_0164_01D20AAE.FC6AA340"
Content-Language: en-us
X-archive-position: 66188
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: kennethnaim@gmail.com
Precedence: normal
Reply-To: kennethnaim@gmail.com
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:mark.bobak@proquest.com>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l
------=_NextPart_000_0164_01D20AAE.FC6AA340
Content-Type: text/plain;
 charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Thank you, I searched on metalink and couldn=E2=80=99t find the right =
keywords for proper search results. I was hoping someone ran into it =
before.

=20

From: Chris Taylor [mailto:christopherdtaylor1994@gmail.com]=20
Sent: Friday, September 9, 2016 3:01 PM
To: kennethnaim@gmail.com
Cc: Ryan January <rjanuary@gmail.com>; Oracle-l Digest Users =
<oracle-l@freelists.org>
Subject: Re: missing part of sql statement in v$sql

=20

THere's a bug in 11.2.0.4 with missing SQL_TEXT - you may be hitting it =
(and apparently several related bugs)

=20


V$SQL.SQL_FULLTEXT For Create Table Statement Is Trimmed (Doc ID =
1922923.1)


=20

On Fri, Sep 9, 2016 at 1:49 PM, Ken Naim <kennethnaim@gmail.com =
<mailto:kennethnaim@gmail.com> > wrote:

Sql_fulltext is missing the 10-20 lines, sql_text has only the first 20 =
or so characters. It=E2=80=99s so odd that the middle of a statement =
would be missing.

=20

Thanks,

Ken

=20

From: Ryan January [mailto:rjanuary@gmail.com =
<mailto:rjanuary@gmail.com> ]=20
Sent: Friday, September 9, 2016 2:42 PM
To: kennethnaim@gmail.com <mailto:kennethnaim@gmail.com>=20
Cc: Oracle-l Digest Users <oracle-l@freelists.org =
<mailto:oracle-l@freelists.org> >
Subject: Re: missing part of sql statement in v$sql

=20

What about sql_fulltext?  Is it complete, or also truncated?

=20

On Sep 9, 2016, at 1:39 PM, Ken Naim <kennethnaim@gmail.com =
<mailto:kennethnaim@gmail.com> > wrote:

=20

I=E2=80=99ve queried v$sql for a particular poorly performing sql_id and =
I get the first and last part but it is missing maybe 10-20 lines from =
just after the first create table statement. Sql_text has just =
=E2=80=9CCREATE TABLE CWC_148D1=E2=80=9D. DB version is 11.2.0.4.

=20

CREATE TABLE CWC_148D1 AS IS_MODIFIED1

FROM (SELECT LEVEL_ID1,LEVEL_ID2,LEVEL_ID3

,MAX(IS_BASE0) AS IS_BASE0

,MAX(IS_BASE1) AS IS_BASE1

,MIN(SEC_BASE0) AS SEC_BASE0

,MIN(SEC_BASE1) AS SEC_BASE1

,MAX(IS_MODIFIED0) AS IS_MODIFIED0

,MAX(IS_MODIFIED1) AS IS_MODIFIED1

FROM CWP_14865_1045_1421068032

GROUP BY LEVEL_ID1,LEVEL_ID2,LEVEL_ID3)ALL_COMBS

,(SELECT LEVEL_ID1,LEVEL_ID3

,(CASE WHEN ((MIN(NVL(IS_BASE1,-1))*MAX(NVL(IS_BASE1,-1))) =3D -1) THEN =
1 END) AS NEED_MERGE

FROM CWP_14865_1045_1421068032

GROUP BY LEVEL_ID1,LEVEL_ID3)BASE0_COMBS

,(SELECT LEVEL_ID1,LEVEL_ID3,COUNT(*) AS WEIGHT_BASE0

FROM (SELECT DISTINCT ITEM_ID,LOCATION_ID,LEVEL_ID1,LEVEL_ID3

FROM CWP_14865_1045_1421068032

WHERE IS_BASE0 =3D 1)WEIGHT_BASE0

GROUP BY LEVEL_ID1,LEVEL_ID3)WEIGHT_BASE0

,(SELECT LEVEL_ID1,LEVEL_ID3,LEVEL_ID2,COUNT(*) AS WEIGHT_BASE1

FROM (SELECT DISTINCT =
ITEM_ID,LOCATION_ID,PROMOTION_ID,LEVEL_ID1,LEVEL_ID3,LEVEL_ID2

FROM CWP_14865_1045_1421068032

WHERE IS_BASE1 =3D 1)WEIGHT_BASE1

GROUP BY LEVEL_ID1,LEVEL_ID3,LEVEL_ID2)WEIGHT_BASE1

WHERE BASE0_COMBS.LEVEL_ID1 =3D ALL_COMBS.LEVEL_ID1

AND BASE0_COMBS.LEVEL_ID3 =3D ALL_COMBS.LEVEL_ID3

AND ALL_COMBS.LEVEL_ID1 =3D WEIGHT_BASE0.LEVEL_ID1(+)

AND ALL_COMBS.LEVEL_ID3 =3D WEIGHT_BASE0.LEVEL_ID3(+)

AND ALL_COMBS.LEVEL_ID1 =3D WEIGHT_BASE1.LEVEL_ID1(+)

AND ALL_COMBS.LEVEL_ID3 =3D WEIGHT_BASE1.LEVEL_ID3(+)

AND ALL_COMBS.LEVEL_ID2 =3D WEIGHT_BASE1.LEVEL_ID2(+)

AND (BASE0_COMBS.NEED_MERGE IS NULL

OR (BASE0_COMBS.NEED_MERGE =3D ALL_COMBS.IS_BASE1)))T_POPU_LIST

,T_EP_EBS_ACCOUNT

,PROMOTION

,T_EP_FISCAL_MONTH

WHERE T_POPU_LIST.LEVEL_ID1 =3D T_EP_EBS_ACCOUNT.T_EP_EBS_ACCOUNT_EP_ID

AND T_POPU_LIST.LEVEL_ID2 =3D PROMOTION.PROMOTION_ID

AND T_POPU_LIST.LEVEL_ID3 =3D T_EP_FISCAL_MONTH.T_EP_FISCAL_MONTH_ID

AND T_POPU_LIST.IS_BASE1 =3D 1

=20

=20


------=_NextPart_000_0164_01D20AAE.FC6AA340
Content-Type: text/html;
 charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 15 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:Courier;
	panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
h3
	{mso-style-priority:9;
	mso-style-link:"Heading 3 Char";
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:13.5pt;
	font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
span.Heading3Char
	{mso-style-name:"Heading 3 Char";
	mso-style-priority:9;
	mso-style-link:"Heading 3";
	font-family:"Calibri Light",sans-serif;
	color:#1F4D78;}
span.EmailStyle19
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
>Thank you, I searched on metalink and couldn=E2=80=99t find the right =
keywords for proper search results. I was hoping someone ran into it =
before.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><b><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span><=
/b><span style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'> =
Chris Taylor [mailto:christopherdtaylor1994@gmail.com] <br><b>Sent:</b> =
Friday, September 9, 2016 3:01 PM<br><b>To:</b> =
kennethnaim@gmail.com<br><b>Cc:</b> Ryan January =
&lt;rjanuary@gmail.com&gt;; Oracle-l Digest Users =
&lt;oracle-l@freelists.org&gt;<br><b>Subject:</b> Re: missing part of =
sql statement in v$sql<o:p></o:p></span></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p =
class=3DMsoNormal><span style=3D'font-family:"Arial",sans-serif'>THere's =
a bug in 11.2.0.4 with missing SQL_TEXT - you may be hitting it (and =
apparently several related bugs)<o:p></o:p></span></p></div><div><p =
class=3DMsoNormal><span =
style=3D'font-family:"Arial",sans-serif'><o:p>&nbsp;</o:p></span></p></di=
v><div><h3><span =
style=3D'font-size:10.5pt;font-family:"Tahoma",sans-serif;color:black'>V$=
SQL.SQL_FULLTEXT For Create Table Statement Is Trimmed (Doc ID =
1922923.1)</span><span =
style=3D'font-family:"Tahoma",sans-serif;color:black'><o:p></o:p></span><=
/h3></div><div><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p =
class=3DMsoNormal>On Fri, Sep 9, 2016 at 1:49 PM, Ken Naim &lt;<a =
href=3D"mailto:kennethnaim@gmail.com" =
target=3D"_blank">kennethnaim@gmail.com</a>&gt; =
wrote:<o:p></o:p></p><blockquote style=3D'border:none;border-left:solid =
#CCCCCC 1.0pt;padding:0in 0in 0in =
6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
>Sql_fulltext is missing the 10-20 lines, sql_text has only the first 20 =
or so characters. It=E2=80=99s so odd that the middle of a statement =
would be missing.</span><o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
>&nbsp;</span><o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
>Thanks,</span><o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
>Ken</span><o:p></o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
>&nbsp;</span><o:p></o:p></p><div><div =
style=3D'border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in =
0in 0in'><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span><=
/b><span style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'> =
Ryan January [mailto:<a href=3D"mailto:rjanuary@gmail.com" =
target=3D"_blank">rjanuary@gmail.com</a>] <br><b>Sent:</b> Friday, =
September 9, 2016 2:42 PM<br><b>To:</b> <a =
href=3D"mailto:kennethnaim@gmail.com" =
target=3D"_blank">kennethnaim@gmail.com</a><br><b>Cc:</b> Oracle-l =
Digest Users &lt;<a href=3D"mailto:oracle-l@freelists.org" =
target=3D"_blank">oracle-l@freelists.org</a>&gt;<br><b>Subject:</b> Re: =
missing part of sql statement in =
v$sql</span><o:p></o:p></p></div></div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>What about =
sql_fulltext?&nbsp; Is it complete, or also =
truncated?<o:p></o:p></p><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p><div><div><blockquote =
style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On Sep 9, =
2016, at 1:39 PM, Ken Naim &lt;<a href=3D"mailto:kennethnaim@gmail.com" =
target=3D"_blank">kennethnaim@gmail.com</a>&gt; =
wrote:<o:p></o:p></p></div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p><div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>I=E2=80=99ve =
queried v$sql for a particular poorly performing sql_id and I get the =
first and last part but it is missing maybe 10-20 lines from just after =
the first create table statement. Sql_text has just =E2=80=9CCREATE =
TABLE CWC_148D1=E2=80=9D. DB version is =
11.2.0.4.</span><o:p></o:p></p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>&nbsp;</span>=
<o:p></o:p></p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>CREATE</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>TABLE</span>&nbsp;CWC_148D1&nbsp;<span =
style=3D'color:blue'>AS</span>&nbsp;IS_MODIFIED1</span><o:p></o:p></p></d=
iv><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>FROM</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>(SELECT</span>&nbsp;LEVEL_ID1<span =
style=3D'color:blue'>,</span>LEVEL_ID2<span =
style=3D'color:blue'>,</span>LEVEL_ID3</span><o:p></o:p></p></div><div><p=
 class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,MAX(</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>IS_BASE0<=
span style=3D'color:blue'>)</span>&nbsp;<span =
style=3D'color:blue'>AS</span>&nbsp;IS_BASE0</span><o:p></o:p></p></div><=
div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,MAX(</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>IS_BASE1<=
span style=3D'color:blue'>)</span>&nbsp;<span =
style=3D'color:blue'>AS</span>&nbsp;IS_BASE1</span><o:p></o:p></p></div><=
div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,MIN(</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>SEC_BASE0=
<span style=3D'color:blue'>)</span>&nbsp;<span =
style=3D'color:blue'>AS</span>&nbsp;SEC_BASE0</span><o:p></o:p></p></div>=
<div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,MIN(</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>SEC_BASE1=
<span style=3D'color:blue'>)</span>&nbsp;<span =
style=3D'color:blue'>AS</span>&nbsp;SEC_BASE1</span><o:p></o:p></p></div>=
<div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,MAX(</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>IS_MODIFI=
ED0<span style=3D'color:blue'>)</span>&nbsp;<span =
style=3D'color:blue'>AS</span>&nbsp;IS_MODIFIED0</span><o:p></o:p></p></d=
iv><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,MAX(</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>IS_MODIFI=
ED1<span style=3D'color:blue'>)</span>&nbsp;<span =
style=3D'color:blue'>AS</span>&nbsp;IS_MODIFIED1</span><o:p></o:p></p></d=
iv><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>FROM</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an =
style=3D'color:olive'>CWP_14865_1045_1421068032</span></span><o:p></o:p><=
/p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>GROUP</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>BY</span>&nbsp;LEVEL_ID1<span =
style=3D'color:blue'>,</span>LEVEL_ID2<span =
style=3D'color:blue'>,</span>LEVEL_ID3<span =
style=3D'color:blue'>)</span>ALL_COMBS</span><o:p></o:p></p></div><div><p=
 class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,(SELECT</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;LEV=
EL_ID1<span =
style=3D'color:blue'>,</span>LEVEL_ID3</span><o:p></o:p></p></div><div><p=
 class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,(CASE</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>WHEN</span>&nbsp;<span =
style=3D'color:blue'>((MIN(NVL(</span>IS_BASE1<span =
style=3D'color:blue'>,-</span><span style=3D'color:maroon'>1</span><span =
style=3D'color:blue'>))</span>*<span =
style=3D'color:blue'>MAX(NVL(</span>IS_BASE1<span =
style=3D'color:blue'>,-</span><span style=3D'color:maroon'>1</span><span =
style=3D'color:blue'>)))</span>&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;<span =
style=3D'color:blue'>-</span><span style=3D'color:maroon'>1</span><span =
style=3D'color:blue'>)</span>&nbsp;<span =
style=3D'color:blue'>THEN</span>&nbsp;<span =
style=3D'color:maroon'>1</span>&nbsp;<span =
style=3D'color:blue'>END)</span>&nbsp;<span =
style=3D'color:blue'>AS</span>&nbsp;NEED_MERGE</span><o:p></o:p></p></div=
><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>FROM</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an =
style=3D'color:olive'>CWP_14865_1045_1421068032</span></span><o:p></o:p><=
/p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>GROUP</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>BY</span>&nbsp;LEVEL_ID1<span =
style=3D'color:blue'>,</span>LEVEL_ID3<span =
style=3D'color:blue'>)</span>BASE0_COMBS</span><o:p></o:p></p></div><div>=
<p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,(SELECT</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;LEV=
EL_ID1<span style=3D'color:blue'>,</span>LEVEL_ID3<span =
style=3D'color:blue'>,COUNT(</span>*<span =
style=3D'color:blue'>)</span>&nbsp;<span =
style=3D'color:blue'>AS</span>&nbsp;WEIGHT_BASE0</span><o:p></o:p></p></d=
iv><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>FROM</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>(SELECT</span>&nbsp;<span =
style=3D'color:blue'>DISTINCT</span>&nbsp;ITEM_ID<span =
style=3D'color:blue'>,</span>LOCATION_ID<span =
style=3D'color:blue'>,</span>LEVEL_ID1<span =
style=3D'color:blue'>,</span>LEVEL_ID3</span><o:p></o:p></p></div><div><p=
 class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>FROM</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an =
style=3D'color:olive'>CWP_14865_1045_1421068032</span></span><o:p></o:p><=
/p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>WHERE</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;IS_=
BASE0&nbsp;<span style=3D'color:blue'>=3D</span>&nbsp;<span =
style=3D'color:maroon'>1</span><span =
style=3D'color:blue'>)</span>WEIGHT_BASE0</span><o:p></o:p></p></div><div=
><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>GROUP</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>BY</span>&nbsp;LEVEL_ID1<span =
style=3D'color:blue'>,</span>LEVEL_ID3<span =
style=3D'color:blue'>)</span>WEIGHT_BASE0</span><o:p></o:p></p></div><div=
><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,(SELECT</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;LEV=
EL_ID1<span style=3D'color:blue'>,</span>LEVEL_ID3<span =
style=3D'color:blue'>,</span>LEVEL_ID2<span =
style=3D'color:blue'>,COUNT(</span>*<span =
style=3D'color:blue'>)</span>&nbsp;<span =
style=3D'color:blue'>AS</span>&nbsp;WEIGHT_BASE1</span><o:p></o:p></p></d=
iv><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>FROM</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>(SELECT</span>&nbsp;<span =
style=3D'color:blue'>DISTINCT</span>&nbsp;ITEM_ID<span =
style=3D'color:blue'>,</span>LOCATION_ID<span =
style=3D'color:blue'>,</span>PROMOTION_ID<span =
style=3D'color:blue'>,</span>LEVEL_ID1<span =
style=3D'color:blue'>,</span>LEVEL_ID3<span =
style=3D'color:blue'>,</span>LEVEL_ID2</span><o:p></o:p></p></div><div><p=
 class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>FROM</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an =
style=3D'color:olive'>CWP_14865_1045_1421068032</span></span><o:p></o:p><=
/p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>WHERE</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;IS_=
BASE1&nbsp;<span style=3D'color:blue'>=3D</span>&nbsp;<span =
style=3D'color:maroon'>1</span><span =
style=3D'color:blue'>)</span>WEIGHT_BASE1</span><o:p></o:p></p></div><div=
><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>GROUP</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>BY</span>&nbsp;LEVEL_ID1<span =
style=3D'color:blue'>,</span>LEVEL_ID3<span =
style=3D'color:blue'>,</span>LEVEL_ID2<span =
style=3D'color:blue'>)</span>WEIGHT_BASE1</span><o:p></o:p></p></div><div=
><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>WHERE</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;BAS=
E0_COMBS<span style=3D'color:blue'>.</span>LEVEL_ID1&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;ALL_COMBS<span =
style=3D'color:blue'>.</span>LEVEL_ID1</span><o:p></o:p></p></div><div><p=
 class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>AND</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;BAS=
E0_COMBS<span style=3D'color:blue'>.</span>LEVEL_ID3&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;ALL_COMBS<span =
style=3D'color:blue'>.</span>LEVEL_ID3</span><o:p></o:p></p></div><div><p=
 class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>AND</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;ALL=
_COMBS<span style=3D'color:blue'>.</span>LEVEL_ID1&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;WEIGHT_BASE0<span =
style=3D'color:blue'>.</span>LEVEL_ID1<span =
style=3D'color:blue'>(+)</span></span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>AND</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;ALL=
_COMBS<span style=3D'color:blue'>.</span>LEVEL_ID3&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;WEIGHT_BASE0<span =
style=3D'color:blue'>.</span>LEVEL_ID3<span =
style=3D'color:blue'>(+)</span></span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>AND</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;ALL=
_COMBS<span style=3D'color:blue'>.</span>LEVEL_ID1&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;WEIGHT_BASE1<span =
style=3D'color:blue'>.</span>LEVEL_ID1<span =
style=3D'color:blue'>(+)</span></span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>AND</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;ALL=
_COMBS<span style=3D'color:blue'>.</span>LEVEL_ID3&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;WEIGHT_BASE1<span =
style=3D'color:blue'>.</span>LEVEL_ID3<span =
style=3D'color:blue'>(+)</span></span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>AND</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;ALL=
_COMBS<span style=3D'color:blue'>.</span>LEVEL_ID2&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;WEIGHT_BASE1<span =
style=3D'color:blue'>.</span>LEVEL_ID2<span =
style=3D'color:blue'>(+)</span></span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>AND</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>(</span>BASE0_COMBS<span =
style=3D'color:blue'>.</span>NEED_MERGE&nbsp;<span =
style=3D'color:blue'>IS</span>&nbsp;<span =
style=3D'color:blue'>NULL</span></span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>OR</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;<sp=
an style=3D'color:blue'>(</span>BASE0_COMBS<span =
style=3D'color:blue'>.</span>NEED_MERGE&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;ALL_COMBS<span =
style=3D'color:blue'>.</span>IS_BASE1<span =
style=3D'color:blue'>)))</span>T_POPU_LIST</span><o:p></o:p></p></div><di=
v><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,</span><span =
style=3D'font-size:10.0pt;font-family:Courier;color:olive;background:whit=
e'>T_EP_EBS_ACCOUNT</span><o:p></o:p></p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,</span><span =
style=3D'font-size:10.0pt;font-family:Courier;color:olive;background:whit=
e'>PROMOTION</span><o:p></o:p></p></div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>,</span><span =
style=3D'font-size:10.0pt;font-family:Courier;color:olive;background:whit=
e'>T_EP_FISCAL_MONTH</span><o:p></o:p></p></div><div><p =
class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>WHERE</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;T_P=
OPU_LIST<span style=3D'color:blue'>.</span>LEVEL_ID1&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;<span =
style=3D'color:olive'>T_EP_EBS_ACCOUNT</span><span =
style=3D'color:blue'>.</span>T_EP_EBS_ACCOUNT_EP_ID</span><o:p></o:p></p>=
</div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>AND</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;T_P=
OPU_LIST<span style=3D'color:blue'>.</span>LEVEL_ID2&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;<span =
style=3D'color:olive'>PROMOTION</span><span =
style=3D'color:blue'>.</span>PROMOTION_ID</span><o:p></o:p></p></div><div=
><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>AND</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;T_P=
OPU_LIST<span style=3D'color:blue'>.</span>LEVEL_ID3&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;<span =
style=3D'color:olive'>T_EP_FISCAL_MONTH</span><span =
style=3D'color:blue'>.</span>T_EP_FISCAL_MONTH_ID</span><o:p></o:p></p></=
div><div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span =
style=3D'font-size:10.0pt;font-family:Courier;color:blue;background:white=
'>AND</span><span =
style=3D'font-size:10.0pt;font-family:Courier;background:white'>&nbsp;T_P=
OPU_LIST<span style=3D'color:blue'>.</span>IS_BASE1&nbsp;<span =
style=3D'color:blue'>=3D</span>&nbsp;<span =
style=3D'color:maroon'>1</span></span><o:p></o:p></p></div></div></blockq=
uote></div><p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p><=
/o:p></p></div></div></div></div></blockquote></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div></div></body></html>
------=_NextPart_000_0164_01D20AAE.FC6AA340--

--
http://www.freelists.org/webpage/oracle-l


