Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nice order to create
Message
From
18/03/2016 07:56:46
 
 
To
18/03/2016 07:23:05
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:
01633342
Views:
62
That's true, with grouping it is not possible with a single expression. But even with an UDF I don't think it's trivial, but may be proven wrong. If I understand it correctly, it would be easy to sort all items, after they are fetched, but it will be hard to generate a string that can handle all incoming new items without being able to formally segment the length of each possible group (like the one-liner I proposed does for just one-group-and-ignore-the-others).

Curious about how you will solve this...

>If I use
>
>TEXT TO lcx NOSHOW  
>1
>10
>2
>03
>1.1
>12.R
>1.1.R
>1201.1.RBX.250.R.1
>1201.1.R.250.R.1
>1201.1.RBX.1.R.1
>1.R
>1.R.1
>A
>B
>AA
>5.R
>CDXB
>ENDTEXT &&lcx 
><pre>
>
>It will fail on the RBX;R;RRBX. The problem ist that a generic number of <i>dot+something groups</i> is hard without some loop.
>
>I think I will mix your code with the function approach.
>
>Thank you (_ _)
>
>
>><PRE>
>>INDEX ON PADL(IIF(ISDIGIT(LEFT(ALLTRIM(item),1)),TRANSFORM(VAL(STREXTRACT(ALLTRIM(item),"",".",1,2)),"@L " + REPLICATE("9",LEN(item))),ALLTRIM(item)),LEN(item),"@") TAG anIndex
>>
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform