Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re[6]: to_number question
Monday, July 19, 2004, 8:24:02 AM, Mercadante, Thomas F (thomas.mercadante_at_labor.state.ny.us) wrote:
MTF> Please please please keep distracting us with your unease about how things MTF> work. I know I learn a lot reading every single stinkin word you put on MTF> this list, as well as what you publish.
I'm almost afraid to post this next question, but here goes.
Here's that same old query with a subquery:
SELECT *
FROM ( SELECT flag, TO_NUMBER(num) num
FROM subtest WHERE flag IN ('A', 'C') )
I can now accept that "num > 0" might be applied to rows that are not returned by the subquery. I have no problem anymore with that happening. I've been converted.
Ok. So. Let's zoom in on the subquery for a moment:
SELECT flag, TO_NUMBER(num) num FROM subtest WHERE flag IN ('A', 'C')
If there is no ordering at all to SQL, then do I also need to accept the possibility here that TO_NUMBER(num) might be evaluated for a row in which flag is other than 'A' or 'C'? In other words, can functions in the SELECT list be evaluated on rows *before* those rows have been determined to fall into the result set? Does the SQL standard have anything to say about this particular question?
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.
![]() |
![]() |