Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL order Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Miscellaneous
Thread ID:
01442212
Message ID:
01442249
Views:
31
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform