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:
01442239
Views:
32
If the first part is always fixed "c:\Data\Datas", then it's again a piece of cake. Is it?


>Hi Naoomi,
>
>Thank !
>
>
>SET ENGINEBEHAVIOR 90
>SELECT DISTINCT  CAST( ADDBS( UPDATE.clocation ) AS C(50) ) AS clocation , UPDATE.iid , ;
>SUBSTR( UPDATE.cLocation,1,LEN(ALLTRIM(ADDBS( UPDATE.clocation ))) - 1) as SortOrder ;
> FROM UPDATE ORDER BY SortOrder , iid WHERE FILE( ADDBS( UPDATE.clocation) + "Id.dbf") AND ;
> FILE( ADDBS(UPDATE.clocation) + "Compagny.dbf") AND ;
> FILE ( ADDBS(clocation) + "Amline.dbc" ) INTO ARRAY Societes
>SET ENGINEBEHAVIOR 70
>
>
>
>
>It is almost the solution.....:-)
>
>Ishould like
>
>c:\amline\data2 before c:\amline\data11
>
>
>cf attachment please...
>
>
>>>
>>>thank in advance for answer.
>>>
>>>
>>>bernhart
>>
>>
>>CREATE CURSOR t (cLocation C(40))
>>INSERT INTO t VALUES ('c:\Data1\')
>>INSERT INTO t VALUES ('c:\Data16\')
>>INSERT INTO t VALUES ('c:\Data16g\')
>>SELECT cLocation,SUBSTR(cLocation,1,LEN(ALLTRIM(ADDBS( clocation ))) - 1) as SortOrder FROM t ORDER BY 2
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform