Re: Re[6]: to_number question

  • From: Natural Join B.V. <lex.de.haan@xxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx, "Mercadante, Thomas F" <oracle-l@xxxxxxxxxxxxx>, "Mercadante, Thomas F" <thomas.mercadante@xxxxxxxxxxxxxxxxx>
  • Date: Mon, 19 Jul 2004 18:51:13 MET

most certainly. the SELECT expression must be a well-formed expression, based 
on the table and column definitions, and should not be dependent on whether or 
not the WHERE clause has done its filtering work.

the relational calculus is rather procedural in nature, as opposed to the 
relational algebra -- for example, the relational algebra does explicitly state 
that the projection and restriction operators can be applied in any order.

SQL is a hybrid language, containing elements from both the calculus and the 
algebra, which makes it a rather "unelegant" and redundant language. the 
calculus and the algebra are logically equivalent.

kind regards,

Lex.

> Monday, July 19, 2004, 8:24:02 AM, Mercadante, Thomas F
(thomas.mercadante@xxxxxxxxxxxxxxxxx) 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') )
> WHERE num > 0;
> 
> 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@xxxxxxxxxxx
> 
> 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@xxxxxxxxxxx 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@xxxxxxxxxxxxx
> put 'unsubscribe' in the subject line.
> --
> Archives are at //www.freelists.org/archives/oracle-l/
> FAQ is at //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@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: