Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL order Problem
Message
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:
01442217
Vues:
50
>Hi all and happy new year for everbody !
>
>I have a problem for indexing a field ( clocation ) in a sql clause.
>cf picture in the attachment please.
>
>
>I should like "c:\datas\Data1" Before "c:\datas\Data1"
>
>it 'is possible ?
>
>
>
>SET ENGINEBEHAVIOR 90
>SELECT DISTINCT  CAST( ADDBS( UPDATE.clocation ) AS C(50) ) AS clocation , UPDATE.iid ;
> FROM UPDATE WHERE FILE( ADDBS( UPDATE.clocation) + "Id.dbf") AND ;
> FILE( ADDBS(UPDATE.clocation) + "Compagny.dbf") AND ;
> FILE ( ADDBS(clocation) + "Amline.dbc" ) INTO ARRAY Societes
ORDER BY 1
>SET ENGINEBEHAVIOR 70
>
>
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform