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: Re[6]: to_number question

Re: Re[6]: to_number question

From: Natural Join B.V. <lex.de.haan_at_naturaljoin.nl>
Date: Mon, 19 Jul 2004 18:51:13 MET
Message-Id: <20040719165138.3654F7D109F@ha-smtp1.tiscali.nl>


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_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') )
> 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@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
> -----------------------------------------------------------------
>



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 Mon Jul 19 2004 - 11:48:28 CDT

Original text of this message

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