Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index expression involving negative numbers
Message
De
10/08/2001 11:08:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Index expression involving negative numbers
Divers
Thread ID:
00542299
Message ID:
00542299
Vues:
40
Hi All,

How can I create an index expression (in the case below tag Amount1) involving two numeric values (pp_NumOper and pp_Amount) when one of them (pp_Amount) can assume negative values, getting the proper sorting sequence (i.e. from the smallest value to the biggest value, considering their algebraic values and not their absolute values).
 Create Cursor CurPagtos          ;
        (                         ;
          pp_NumOper   N ( 6)   , ;
          pp_Amount    N (14, 2)  ;
        )

 Index on Str  (pp_Amount, 14, 2) + Str (pp_NumOper, 6) Tag Amount1
 Index on       pp_Amount                               Tag Amount2

 nAnyValue = 123

 For nAmount = -10 To 10 Step 1

     Insert into CurPagtos (pp_NumOper, pp_Amount) ;
                    Values (nAnyValue , nAmount  )
 EndFor
                
 Set Order To Amount1
 Browse
If I could create an index expresion involving just pp_value (tag Amount2) it works fine, but that's not the case, I must add pp_NumOper also (the example above was simplified from the real one).

Any help appreciated!

Thanks,

Fernando
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform