Sorting compound names
jda
jda at his.com
Sun Sep 19 09:40:15 CDT 2004
>le 19/09/04 13:45, jda <jda at his.com> a écrit :
>
>> What do you think?
>
>I'm not sure to well understand what are the starting point.
>One VtextField with your list of CR-separated names or is it a list that you
>want to insert in a table ?
Many records (perhaps thousands) with many
fields. One field is for names -- authors.
Imagine a database containing books, each book
having from 1 to n authors. If > 1 author, the
names in the authors field are separated by CRs.
We want to sort the records by the authors field.
Note that, therefore, if the first name is
identical (in the CR-separated name field) in two
records, the sort takes into account the second
name, and so on.
>
>If you have a table with a field containing the complete names, you could
>create a method field to strip the forbidden word and sort on this field.
>
>For instance :
>
>Field name : CompleteName NameToSort
>Method : Replace(CompleteName, 'van ', '')
>
>Data : van Laaken, D Laaken, D
> Smith, TR Smith, TR
> Van Meer, FG Meer, FG
>
>
>In your SQL Select, you say :
> SELECT fieldList FROM tableName ORDER BY NameToSort
>
>I don't remember if the valentina REPLACE function is case sensitive. If
>yes, you must change he method accordingly.
>
I'll have to look at this more closely. Does
Replace to a Replace All, or does it just replace
the first occurrence? As you see from my example,
one field can have multiple occurrences of a
prefix such as "van".
Jon
More information about the Valentina-beta
mailing list