Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need idea for sort
Message
De
02/03/2010 00:52:37
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01451160
Message ID:
01451909
Vues:
47
I will have a look at it later on. This particular problem is not so much important now ::(

Agnes
>Here it is:
>
>
>CREATE CURSOR c_test (ctext C(40))
>INSERT INTO c_test (ctext) VALUES ('1.1')
>INSERT INTO c_test (ctext) VALUES ('1.02')
>INSERT INTO c_test (ctext) VALUES ('10.1')
>INSERT INTO c_test (ctext) VALUES ('01.3')
>INSERT INTO c_test (ctext) VALUES ('1.02.N')
>INSERT INTO c_test (ctext) VALUES ('1.02.N.R')
>INSERT INTO c_test (ctext) VALUES ('1.10.R')
>INSERT INTO c_test (ctext) VALUES ('1.10.R.1')
>INSERT INTO c_test (ctext) VALUES ('20DP')
>INSERT INTO c_test (ctext) VALUES ('20')
>INSERT INTO c_test (ctext) VALUES ('1.02.R')
>INSERT INTO c_test (ctext) VALUES ('01.R')
>INSERT INTO c_test (ctext) VALUES ('1.02.100')
>INSERT INTO c_test (ctext) VALUES ('1.02.NA')
>INSERT INTO c_test (ctext) VALUES ('01.R1')
>INSERT INTO c_test (ctext) VALUES ('01.1R')
>
>LOCAL lcSelect
>lcSelect=[SELECT ctext,]
>FOR lnX=1 TO 20
>	lcSelect=lcSelect+[PADL(ALLTRIM(STR(]+;
>		[IIF(VAL(GETWORDNUM(ctext,]+ALLTRIM(STR(lnX))+[,'.'))>0]+;
>		[,VAL(GETWORDNUM(ctext,]+ALLTRIM(STR(lnX))+[,'.'))]+;
>		[,99999999))),40,'0')+]+;
>		[PADR(CHRTRAN(GETWORDNUM(ctext,]+ALLTRIM(STR(lnX))+[,'.'),'0123456789',''),40) ]+;
>		[as s]+ALLTRIM(STR(lnX))+;
>	IIF(lnX<20,[,],[])
>endfor
>lcSelect=lcSelect+[ FROM c_test ORDER BY ]
>FOR lnX=1 TO 20
>	lcSelect=lcSelect+[s]+ALLTRIM(STR(lnX))+IIF(lnX<20,[,],[])
>ENDFOR
>
>&lcSelect
>
>
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform