Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Query failing in CBO mode

Query failing in CBO mode

From: Anubha Jalsingh <ajalsingh_at_lycos.com>
Date: Tue, 25 Feb 2003 21:18:56 -0800
Message-ID: <F001.00559992.20030225211856@fatcity.com>


I have an application query that runs fine in RBO mode but failing in CBO with ORA-01722: invalid number -

select /*+ rule */ ORDER_NO,ITEM_NO
from SCHED_RECEIPTS_at_db01.world
where ORDER_NO = 4432089
and PROJECT_ORDER = 'Y' and ORDER_STATUS ='O'

ORDER_NO ITEM_NO

---------- --------------------

4432089 TOOLING COSTS 1 row selected.

select /*+ choose */ ORDER_NO,ITEM_NO
from SCHED_RECEIPTS_at_db01.world
where ORDER_NO = 4432089
and PROJECT_ORDER = 'Y' and ORDER_STATUS ='O'

ERROR:
ORA-01722: invalid number
ORA-02063: preceding line from DB01.WORLD

no rows selected

ORDER_NO column is varchar2 field and it may be containing some non-numeric data, so I understand that Oracle may be doing implicit conversion on order_no. But, then why it is working fine in RULE based. The explain plan is same in both cases and is using FULL Table access. The table has unique index on ORDER no.

Thanks in advance.
Manmohan



Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Anubha Jalsingh
  INET: ajalsingh_at_lycos.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Feb 25 2003 - 23:18:56 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US