Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nice order to create
Message
From
18/03/2016 06:02:57
 
 
To
18/03/2016 05:00:33
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01633318
Message ID:
01633326
Views:
62
Does this cover all of your requirements?
LOCAL lcInput AS String
LOCAL ARRAY laInput(1)

TEXT TO m.lcInput NOSHOW FLAGS 1
1
10
2
03
1.1
12.R
1.1.R
1.R
1.R.1
A
B
AA
5.R
ENDTEXT

CREATE CURSOR curList (item C(20))
INDEX ON PADR(IIF(ISDIGIT(LEFT(ALLTRIM(item),1)),STR(VAL(STREXTRACT(ALLTRIM(item),"",".",1,2)),20),ALLTRIM(item)),20) TAG anIndex
ALINES(m.laInput, m.lcInput)

LOCAL lnLoop
FOR m.lnLoop = 1 TO ALEN(m.laInput)
	INSERT INTO curList (item) VALUES (m.laInput[m.lnLoop])
ENDFOR

BROWSE
>Hi everybody.
>
>I have a list with elements like
>
>1
>10
>2
>03
>1.1
>12.R
>1.1.R
>1.R
>1.R.1
>A
>B
>AA
>5.R
>
>I need to order (by indexing) this to
>
>1
>1.1
>1.1.R
>1.R
>1.R.1
>2
>03
>5.R
>10
>12.R
>A
>B
>AA
>
>any idea to do this, as fast as possible?
>
>Thanks
>
>Lutz
----------------------------------
António Tavares Lopes
Previous
Reply
Map
View

Click here to load this message in the networking platform