Filtering Columnar Data
sarah.reichelt at gmail.com
Mon Jul 16 18:45:54 EDT 2007
> I'm struggling with the filter command. I have tab-delimited data in
> a field, where each row has at least 56 columns. I want to filter
> the data based on a chosen number in that fourth column, for example,
> to return all lines that have a 9 there. The fourth column only
> contains a number from 1 to 10. The following handler works most of
> the time. I put three wild card expressions, lone asterisks
> separated by tabs, to make sure nothing is being picked up in the
> first three columns. The tab and asterisk (and it could be just an
> *) following myNumber says that it doesn't matter what is in the
> columns after the fourth.
> put fld "Data" of this card into tmpData
> filter tmpData with "*" & tab & "*" & tab & "*" & tab & myNumber &
> tab & "*"
I seem to remember an old thread where it was discovered that when you
start looking at complex filters like this, a "repeat for each" loop
ends up faster. Worth testing anyway.
More information about the Use-livecode