Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complex index is this possible?
Message
De
11/06/2013 06:10:24
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01575993
Message ID:
01575998
Vues:
55
>>>I want to index a file on descending order of fields 1 and 2 but within that on ascending oder of fields 3 - how can I do this?
>>>I have tried this but it doesn't work
>>>index on dupkey+codex DESCENDING, COPYNO ASCENDING TAG docky
>>
>>IF COPYNO is an integer, you can try something like
>>
>>index on dupkey+codex + Cast(2^31-1-COPYNO AS M) DESCENDING TAG docky && updated 'C' to 'M'
>
>Sadly Copy No is an alpha field it contains Copy No 421 for example

There's always a solution with VFP!

index on dupkey+codex + Cast(2^31-1- Cast(strtran(COPYNO, chrtran(COPYNO, '0123456789', '')) AS I) AS M) DESCENDING TAG docky
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform