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: One last question

RE: One last question

From: <dhotka_at_earthlink.net>
Date: Sat, 17 Jul 2004 15:15:26 -0400
Message-ID: <267950-220047617191526237@M2W095.mail2web.com>


Hi Jonathan,

One of the rows in the 'num' field has something other than a number in it=2E=2E=2EI've seen this problem before=2E My guess is you have more tha= n just
numbers num field, and it is something higher than '9'=2E=2E=2Erun the que= ry
without the to_number function and see what the data looks like=2E=2E=2Epe= rhaps
spool it to a file for closer examination=2E

Dan

Original Message:



From: Jonathan Gennick jonathan_at_gennick=2Ecom Date: Fri, 16 Jul 2004 21:01:58 -0400
To: oracle-l_at_freelists=2Eorg
Subject: One last question

Wolfgang,

One last question, and then I'm done for the night=2E 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=2Ecom * 906=2E387=2E1698 * mailto:jonathan@gennick=2Ecom

Join the Oracle-article list and receive one article on Oracle technologies per month by=20 email=2E To join, visit
http://five=2Epairlist=2Enet/mailman/listinfo/oracle-article,=20 or send email to Oracle-article-request_at_gennick=2Ecom and=20 include the word "subscribe" in either the subject or body=2E



Please see the official ORACLE-L FAQ: http://www=2Eorafaq=2Ecom

To unsubscribe send email to: oracle-l-request_at_freelists=2Eorg put 'unsubscribe' in the subject line=2E
--

Archives are at http://www=2Efreelists=2Eorg/archives/oracle-l/ FAQ is at http://www=2Efreelists=2Eorg/help/fom-serve/cache/1=2Ehtml


mail2web - Check your email from the web at http://mail2web=2Ecom/ =2E

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 Sat Jul 17 2004 - 14:12:13 CDT

Original text of this message

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