Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: One last question
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:
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') )
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