Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nice order to create
Message
From
18/03/2016 06:26:34
 
 
To
18/03/2016 06:19: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:
01633331
Views:
50
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
>I'm in general no friend of definition of such borderes besides field lenght and VFP type and field limitations. There are reasonable assumptions, but we all remember the two digit years or the 1.9.[19]99 as default value ...
>
>Let's say we do 5 digits per group and no mix of numeric / non numeric.
>
>The index is on a CA, I can generate the index code on the fly and do a guess depending on recent field values, so we just can take any number.
>
>What I have a problem with is is to split the field into any other fields, because this needs to be done on any change while the cursor is living - and that's a pain.
>
>Also the CA is refreshed in a not to slow pace, so scanning through it seems not fine.
>
>>Define very large borders, like max # dots less than 30, max 8 of chars between each dot and it is easy to parse into 1 char field and index that ;-))
>>User is even allowed to mix numeric and non-numeric if he accepts 0,1,9,A,B
>>just padl(upper(),"0")each "dotted" column read in via alines(,,"0") and fill empty columns...
>>lokk at bottom example of left filled "ASCII-IP"
>>
>>>We name a record with field x simply a record.
>>>
>>>Any record with a non numeric infront of the first or none dot is trailing any record with numerics in front of first or none dot.
>>>Numerics and non numerices should not be mixed with in a group delimited by dots.
>>>Numerics should be orderd numerical.
>>>Non numerics could be any letter [A..Z]+ and should be ordered like numericals A,B,AA,AB, AAC (there is a small chance to talk customer into alphabetical order, because AA is not very likely)
>>>With in the order given above the following groups should follow this. It's high probalility to have just groups of .1 and .R now, but I don't like to run in it the other day.
>>>
>>>Nun ist es bestimmt klar wie Kloßbrühe ... :(
>>>
>>>>the ordering of "03" needs converting via value, ordering "AA" after "B" might imply converting via Hex or at least a padl(), but then you will give me an item with a letter beyond "F" like "R" in first spot or n- letter groups ? Can you define the ordering algorithm in words?
>>>>
>>>>//upd: if you can define a max length between dots, a max # of dots (arbitrarily high would be enough) and can exclude all chars not in ["0".."9"] or ["A".."Z"]
>>>>you could build an ordering string of padl() columns, see example down below in your ordered data, with comment on "03"
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform