Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Nice order to create
Message
De
18/03/2016 05:31:21
 
 
À
18/03/2016 05:16:34
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01633318
Message ID:
01633323
Vues:
65
the ordering of "03" needs converting via value, ordering "AA" after "B" might imply converting via Hex or at least a padl(), but then you will give me an item with a letter beyond "F" like "R" in first spot or n- letter groups ? Can you define the ordering algorithm in words?

//upd: if you can define a max length between dots, a max # of dots (arbitrarily high would be enough) and can exclude all chars not in ["0".."9"] or ["A".."Z"]
you could build an ordering string of padl() columns, see example down below in your ordered data, with comment on "03", column max length of 4 ;-))

>The number of dots is not limited, at least not reasonable. :(
>Also the user might alter the field (IOW append dot letter sections or change the whole thing). Thats why I like to have it as index expression - it would sort itself.
>
>>create 3 virtual columns with the dot as separator, order columns on padl(evl(int(val()), 999),3). Then think about the last Item, AA ;-)
>>
>>
>>
>>>Hi everybody.
>>>
>>>I have a list with elements like
>>>
>>>1
>>>10
>>>2
>>>03
>>>1.1
>>>12.R
>>>1.1.R
>>>1.R
>>>1.R.1
>>>A
>>>B
>>>AA
>>>5.R
>>>
>>>I need to order (by indexing) this to
>>>
>>>    1
>>>    1.    1
>>>    1.    1.    R
>>>    1.    R
>>>    1.    R.    1
>>>    2
>>>   03        && here you need a padl(int(val())) to be ordered above next item! Or at least padding with "0"
>>>    5.     R
>>>   10
>>>   12.     R
>>>     A
>>>     B
>>>  AA
>>> 0001
>>> 0001.0001
>>> 0001.0001.000R
>>> 0001.000R
>>> 0001.000R.0001
>>> 0002
>>> 0003        && here you need a padl(int(val())) to be ordered above next item! Or at least padding with "0"
>>> 0005.000R
>>> 0010
>>> 0012.000R
>>> 000A
>>> 000B
>>> 00AA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform