Filtering Columnar Data

Gregory Lypny gregory.lypny at videotron.ca
Sat Dec 10 10:49:24 EST 2005


Thanks, Ken.  Crystal clear.

	Greg

On 10-Dec-05, at 8:52 AM, Ken Ray responded:

> Message: 5
> Date: Fri, 09 Dec 2005 23:06:07 -0600
> From: Ken Ray <kray at sonsothunder.com>
> Subject: Re: Filtering Columnar Data
> To: Use Revolution List <use-revolution at lists.runrev.com>
> Message-ID: <BFBFBE5F.31791%kray at sonsothunder.com>
> Content-Type: text/plain;	charset="US-ASCII"
>
> On 12/9/05 10:26 PM, "Gregory Lypny" <gregory.lypny at videotron.ca>  
> wrote:
>
>> Not sure I understand, Ken.  Your first statement puts searchString
>> in the fifth column, while the second puts it in the fourth.  If I
>> changed mine to
>>
>> filter theData with "*" & tab & searchString & tab & "*"
>>
>> or
>>
>> filter theData with "*" & tab & searchString & "*"
>>
>> it would still find the string in the second column, but perhaps in
>> higher columns too because the pattern can be shifted right.
>
> That's right. That's why to match a specific column, you need to  
> include
> *all* the columns in your filter command. So for a 5-column set of  
> data, in
> order to specify the second column and only the second column you'd  
> do:
>
>   filter theData with "*" & tab & searchString & tab & "*" & tab & \
>     "*" & tab & "*"
>
> and to filter on only the fourth column of 5, it would be:
>
>   filter theData with "*" & tab & "*" & tab & "*" & tab & \
>    searchString & tab & "*"
>
> The only issue is when you're matching the last column... you have  
> to make
> sure you *don't* put a "*" after the last column, so it would be:
>
>   filter theData with "*" & tab & "*" & tab & "*" & tab & \
>    "*" & tab & searchString
>
> and not
>
>   filter theData with "*" & tab & "*" & tab & "*" & tab & \
>    "*" & tab & searchString & "*"
>
>
> But perhaps repeat for each is a better choice for you...




More information about the use-livecode mailing list