From oracle-l-bounce@freelists.org  Wed May  5 11:47:33 2004
Return-Path: <oracle-l-bounce@freelists.org>
Received: from air189.startdedicated.com (root@localhost)
 by orafaq.com (8.11.6/8.11.6) with ESMTP id i45GlIA16145
 for <oracle-l@orafaq.com>; Wed, 5 May 2004 11:47:28 -0500
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i45Gl8616081
 for <oracle-l@orafaq.com>; Wed, 5 May 2004 11:47:18 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP
 id 84C5F72D76C; Wed,  5 May 2004 11:36:58 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 27833-25; Wed,  5 May 2004 11:36:58 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP
 id BE91072D769; Wed,  5 May 2004 11:36:57 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 05 May 2004 11:35:41 -0500 (EST)
X-Original-To: oracle-l@freelists.org
Delivered-To: oracle-l@freelists.org
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 78F8772D6DF
 for <oracle-l@freelists.org>; Wed,  5 May 2004 11:35:40 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 27015-85 for <oracle-l@freelists.org>;
 Wed,  5 May 2004 11:35:40 -0500 (EST)
Received: from maillnx-us112.fmr.com (maillnx-us112.fmr.com [192.223.198.27])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 27BA172D45D
 for <oracle-l@freelists.org>; Wed,  5 May 2004 11:35:40 -0500 (EST)
Received: from virmro111nts.fmr.com (VIRMRO111NTS.fmr.com [172.26.5.99])
 by maillnx-us112.fmr.com (Switch-3.1.2/Switch-3.1.0) with SMTP id i45GnSZE013459
 for <oracle-l@freelists.org>; Wed, 5 May 2004 12:49:29 -0400
Received: from MSGBOSCLF2WIN.fmr.com ([10.46.17.174]) by MSGMROIM01WIN.DMN1.FMR.COM with Microsoft SMTPSVC(5.0.2195.6713);
	 Wed, 5 May 2004 12:49:28 -0400
X-MimeOLE: Produced By Microsoft Exchange V6.0.6521.0
content-class: urn:content-classes:message
Subject: RE: Wrong results using decode when db upgraded to 9205
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Date: Wed, 5 May 2004 12:49:28 -0400
Message-ID: <42BBD772AC30EA428B057864E203C999114040@MSGBOSCLF2WIN.DMN1.FMR.COM>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Wrong results using decode when db upgraded to 9205
Thread-Index: AcQyvj619zzxNhLXTTytiKasvD+vBQAAx7WA
From: "Khedr, Waleed" <Waleed.Khedr@FMR.COM>
To: <oracle-l@freelists.org>
X-OriginalArrivalTime: 05 May 2004 16:49:28.0282 (UTC) FILETIME=[EE1723A0:01C432C0]
X-Virus-Scanned: by amavisd-new at freelists.org
X-archive-position: 4461
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: Waleed.Khedr@FMR.COM
Precedence: normal
Reply-To: oracle-l@freelists.org
X-list: oracle-l
X-Virus-Scanned: by amavisd-new at freelists.org

Same sql/different plans give different results means a bug, make sure =
you have the downgrade script :)

Waleed

-----Original Message-----
From: Jamadagni, Rajendra [mailto:Rajendra.Jamadagni@espn.com]
Sent: Wednesday, May 05, 2004 12:26 PM
To: oracle-l@freelists.org
Subject: RE: Wrong results using decode when db upgraded to 9205


I just found that the query in question works ... In following
conditions ...

1. using case structure instead of DECODE
2. by running the report with cursor_sharing=3D3Dexact or providing
cursor_sharing_exact hint at statement level
3. Running the select with rule hint.

BTW it is not datatype conversion issue, the actual decode statement is
as follows ...

"and decode('C8','C8','237','0') =3D3D '237'"
=3D20
It is becoming obvious to me that this is an optimizer issue. I'll be
digging further ... =3D20

Raj
------------------------------------------------------------------------
--------=3D20
Rajendra dot Jamadagni at nospamespn dot com=3D20
All Views expressed in this email are strictly personal.=3D20
select standard_disclaimer from company_requirements;=3D20
QOTD: Any clod can have facts, having an opinion is an art !

-----Original Message-----
From: oracle-l-bounce@freelists.org
[mailto:oracle-l-bounce@freelists.org] On Behalf Of Stefan Jahnke
Sent: Wednesday, May 05, 2004 11:56 AM
To: oracle-l@freelists.org
Subject: AW: Wrong results using decode when db upgraded to 9205

Hi again

Sorry, haven't looked into it. Since we already changed everything to =
=3D
=3D3D
CASE on 9.2.0.4.0. The reason wasn't a bug but to be coherent with the =
=3D
=3D3D
usage of DECODE / CASE. We agreed upon ANSI style stuff (INNER JOIN, =
=3D3D
CASE blahblah) since 2 developers have a SQL Server background and seem
=3D3D to comprehend that faster (no pun intended, they're great).

Stefan


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

