ORDER BY

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Aug 7 08:44:08 CDT 2004


On 8/7/04 2:18 AM, "jda" <jda at his.com> wrote:

Hi Jon,

> In V1.x I could ORDER a cursor by a field I did not select.
> 
> It seems that this causes an error in V2.0. Is that correct -- it is
> no longer allowed and you must select the field you ORDER by?

Hmm, as I remember, on start Valentina 1.x did allow this.
Later when GROUP BY was implemented Valentina 1.x also prohibit this.
So are you sure that in Valentina 1.10 you could do this ?!

And yes. SQL92 do not allow this.
Because ORDER BY sorts NEW result table in general case.

Because ORDER BY also have syntax

    ORDER BY 1, 2 

To refer fields from SELECT rule.


> And secondly, if so, I think this might be the cause of the "field
> not found" error I reported earlier -- I was sorting by a method
> (although the field the method sorted by was in fact selected...).

Ivan,

Add Please test 

SELECT f1, f2
FROM T
ORDER BY f3

And check what error is throw,
And it seems that error message do not display name "f3"



-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list