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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: to_number question

Re: to_number question

From: Tanel Põder <tanel.poder.003_at_mail.ee>
Date: Thu, 15 Jul 2004 05:23:59 +0300
Message-ID: <01e301c46a12$cc172140$63a423d5@porgand>


Hm,

Maybe it has something to do how optimizer transforms your query (maybe a bug or a feature).

Try it with NO_MERGE, NO_UNNEST, NO_EXPAND, CURSOR_SHARING_EXACT hints or set some relevant parameters (_unnest_subquery=false, _complex_view_merging=false) and compare the execution plans if the behaviour changes.

Btw, in 10g there is a NO_QUERY_TRANSFORMATION hint which disables all optimizer's query transformations...

Tanel.

>
> OK. It's something about the WHERE clause being outside the subquery.
> (Mebbe somebody can explain it.)
>
> select nbr_cc_fop_name from nbr_cc
> where nbr_cc_fop_name in ('AX','MC','VI','DS')
> and to_number(trim(nbr_cc_no_high)) - to_number(trim(nbr_cc_no_low)) > 0
>
> WORKS!
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request_at_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_at_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
-----------------------------------------------------------------
Received on Wed Jul 14 2004 - 21:20:50 CDT

Original text of this message

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