Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL order Problem
Message
 
 
À
05/01/2010 14:42:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Divers
Thread ID:
01442212
Message ID:
01442249
Vues:
29
>Based on Naomi's example:
>
>SET ENGINEBEHAVIOR 90
>SELECT DISTINCT;
>       CAST( ADDBS( UPDATE.clocation ) AS C(50) ) AS clocation,;
>       UPDATE.iid,;
>       CHRTRAN(SUBSTR(UPDATE.cLocation,1,LEN(ALLTRIM(ADDBS(UPDATE.clocation ))) - 1),"0123456789","") AS SortOrder1,;
>       VAL(CHRTRAN(UPDATE.cLocation,CHRTRAN(UPDATE.cLocation,"0123456789",""),""))                    AS SortOrder2;
>FROM UPDATE;
>WHERE FILE( ADDBS(UPDATE.clocation) + "Id.dbf")       AND ;
>      FILE( ADDBS(UPDATE.clocation) + "Compagny.dbf") AND ;
>      FILE (ADDBS(clocation) + "Amline.dbc" );
>ORDER BY SortOrder1, SortOrder2, Iid;
>INTO ARRAY Societes
>SET ENGINEBEHAVIOR 70
>
>
>NOT TESTED!!!!!!!!!!!!!!
>
>
>
My concern was that we only may want to transform the last part (the last directory). In other words, how

c:\Data1\Data2
c:\Data2\Data1
c:\Data3\Data11

should be sorted?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform