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

Home -> Community -> Mailing Lists -> Oracle-L -> One last question

One last question

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Fri, 16 Jul 2004 21:01:58 -0400
Message-ID: <1571111499121.20040716210158@gennick.com>


Wolfgang,

One last question, and then I'm done for the night. Here's that query again:

SQL> SELECT *
  2 FROM ( SELECT flag, TO_NUMBER(num) num

  3         FROM subtest
  4         WHERE flag IN ('A', 'C') )

  5 WHERE num > 0;
ERROR:
ORA-01722: invalid number

How can I know whether it is "num > 0" that is causing the error? Could it be that TO_NUMBER(num) is being evaluated *before* the subquery's WHERE clause filters out rows NOT IN ('A', 'C')?

In other words, how can I know that the problem I'm seeing is really the result of the two queries being merged?

Best regards,

Jonathan Gennick --- Brighten the corner where you are http://Gennick.com * 906.387.1698 * mailto:jonathan@gennick.com

Join the Oracle-article list and receive one article on Oracle technologies per month by email. To join, visit http://five.pairlist.net/mailman/listinfo/oracle-article, or send email to Oracle-article-request_at_gennick.com and include the word "subscribe" in either the subject or body.



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 Fri Jul 16 2004 - 19:58:31 CDT

Original text of this message

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