Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change Order of a set of data
Message
De
05/04/2002 09:09:26
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
05/04/2002 05:31:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00641277
Message ID:
00641383
Vues:
18
>Never done it.
>
>If I were you I would add an Integer field
>
>Start numbering from a power of 2 (eg 2^10), and increment by it
>
>Insert = eg (1024 + 2048)/2
>
>index on bintoc() (Collating sequence = 'Machine')
>
>if the order is changed, update the underlying table, renumbering and incrementing by 2^10
>
>You may choose that the user changes the order by entering a value

Hi Gregory,
lets see if I understand (I try to repeat with my words)

First, the UI is simple up and down arrows [o.k. customer like drag'n'drop but he don't wan't to pay this ::)], user will not see the order criteria.

Initally I order like 1*(2^p),2*(2^p) .. n*(2^p)

A change of order will be somewhere between (n-1)(2^p) and n(2^p)
(at (n-1)(2^p)+(2^(p-1)?, but this will end up in p divisions ...)
After finish of ordering I update the table.

I don't understand ".... renumbering and incrementing by 2^10"
Do you mean renumbering the whole table to 1*(2^p),2*(2^p) .. n*(2^p)?

Why do you use "INDEX ON BINTOC(iOrder)"? Is there a difference (excepted space) to INDEX ON iOrder)

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform