ORDER BY
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Jan 23 08:49:05 CST 2003
on 1/23/03 1:11 AM, Rick Robinson at rickrobinson at attbi.com wrote:
> Next question...
>
> How does the SQL "ORDER BY" statement work in Valentina? I want to sort
> a list of recipes by their name. The name, which can be up to 80
> characters is stored in a text field. I'd like to also sort by the type
> of recipe (Dessert, Appetizer, Beverage, Snack, etc.)
>
> I have a statement:
>
> c = new vCursor(myDataBase,"select * from recipes where cuisine_fld =
> '" + t + "' ORDER BY type_fld, name_fld")
>
> Then I display these in a list in the order "name" followed by "type".
>
> I get all the recipes of a particular type grouped together in the
> list. But, the names are not in alphabetical order with similarly named
> recipes together. I might get recipes that start with the word
> "Chocolate" spread around throughout the list. Is the ORDER BY sort a
> strict alphabetical sort? Does the length of the text in the field
> change the result?
Hi Ric,
You really use TEXT field ?
No, for name -- 80 chars you need use VarChar[80]
TEXT field cannot be sorted by definition.
--
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://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list