Filtering Columnar Data

Ken Ray kray at sonsothunder.com
Fri Dec 9 20:22:16 EST 2005


On 12/9/05 4:19 PM, "Gregory Lypny" <gregory.lypny at videotron.ca> wrote:

> Hello everyone,
> 
> I use the filter command on tab-delimited text files when I want to
> pick off a string in a particular column.  For example, if the string
> is located in the second column of a five column file, I use
> 
> filter theData with "*" & tab & searchString & tab & "*" & tab & "*"
> & tab & "*"  .
> 
> This, I assume, ensures that my hits don't include lines where the
> string appears in any other column.  It works like lightening when I
> search in any of the first four columns, but beyond that I get the
> dreaded spinning beach ball in Mac OS X (Tiger).  Is there a better way?

Yes, the problem (I think) is that you probably have the "*" after the last
column - I just worked with this today, and ran into the same problem. If
you remove the last asterisk you should be fine:

    "*" & tab & "*" & tab & "*" & tab & "*" & tab & searchString

whereas for column 4 it would be:

    "*" & tab & "*" & tab & "*" & tab & searchString & tab & "*"

Hope this helps,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list