Returning a partial string

jda jda at his.com
Sat Jul 9 14:45:07 CDT 2005


>  > As I said, it worked in V1. Of course it would be slower if the index
>>  was built on the fly, but in my case I don't care -- it is a
>>  worthwhile trade-off. Can this be implemented again in V2?
>
>It can be of course with some efforts.
>
>But Jon, in v1 did work only methods.
>Formulas in SELECT did not work at all in v1
>

Hm, I was able to do this in V1 (the temp field named 'fld' let me 
sort by author names, and if there were no authors in the record, by 
editor names, and if both were NULL sort by title):

Create temp method:

fld = 
myDatabase.myReferences.createVarCharField("authorEditorSortMethod", 
2000, EVFlag.fNone, "IFNULL(authors, IFNULL(editors,title))")

Use:

s = "select *,authorEditorSortMethod from thereferences where hit>0 
ORDER BY authorEditorSortMethod,thedate"


This is pretty much what I want to do now -- create temporary 
*methods* that return values I can sort by. This is just like V1, I 
think (no?).

Jon


More information about the Valentina-beta mailing list