ORDER BY

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Aug 7 17:07:26 CDT 2004


On 8/7/04 4:55 PM, "jda" <jda at his.com> wrote:


> OK, Ivan, I see. Then how do this:
> 
> I have a method for each field so that I can do a case-insensitive
> sort. The name of the sort method is the name of the field +
> "SortMethod". For example, to sort Authors, I have a method
> AuthorsMethod.
> 
> Here is that method definition:
> 
> authorsSortMethod = CreateTextField("authorsSortMethod", 128,
> "English", Valentina.fIndexed, "Upper(authors)")
> 
> Here is how I have used it in Valentina 1.x:
> 
> myCursor = myDatabase.SQLSelect("select id,authors,thedate,title,hit
> from thereferences ORDER BY authorsSortMethod",
> Valentina.kServerSide, Valentina.kReadOnly)
> 
> What is the best way of doing this in Valentina 2.0?

1) you can SELECT AuthorsMethod to be last field, and ignore it in your code


2) MAY BE later we will again allow ORDER BY for not selected field for
cases where this is possible. E.g. Single table query, as your.


3) the BEST WAY in 2.0 for your project will be next!

 * you will REMOVE at all your method fields!
 * so your table will have not 70 fields as now but 35 fields.

You will get the same functionality using new feature

        Vfield.CollationStrength = ...

So be prepared!
Your project and tables will become much more simple now.


-- 
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