Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VFP 5 - SET FILTER

1,561 views
Skip to first unread message

Eric Ladouceur

unread,
Jan 14, 1999, 3:00:00 AM1/14/99
to
I am using a view and I would like to use a filter but my filter
should look like this:

SET FILTER TO City LIKE "%Lake%"

Set Filter doesn't accept the LIKE condition. I know I can include
this in my view but I need this filter only once in my program and I
use this view in many other place in my program without any filters.

Any solutions to this problem ?

Thank you in advance
Eric Ladouceur
a...@magma.ca

Weizi Wang

unread,
Jan 14, 1999, 3:00:00 AM1/14/99
to
Try this
lcExact = set('exact')
set exact off
set filter to city = "Lake"
set exact &lcExact

Eric Ladouceur wrote in message <369e34ec...@news.magma.ca>...

Weizi Wang

unread,
Jan 14, 1999, 3:00:00 AM1/14/99
to
Try this
lcExact = set('exact')
set exact off
set filer to city = 'Lake'

Anders Altberg

unread,
Jan 14, 1999, 3:00:00 AM1/14/99
to
Erik
That is the SQL version of LIKE that only works in WHERE clause of SQL
SELECT, DELETE and UPDATE . You have to use the xbase LIKE() or the $
operator here:
SET FILTER TO LIKE("*Lake*", city)
SET FILTER TO "Lake" $ city
-Anders

Eric Ladouceur

unread,
Jan 15, 1999, 3:00:00 AM1/15/99
to
Thanks a lot anders, this works perfectly.

Eric

Lisa Slater Nicholls

unread,
Jan 16, 1999, 3:00:00 AM1/16/99
to
Hi Eric,

Another variation on Anders' solution would be the ATC() or AT()
functions -- they're supposed to be a little faster than $, although I don't
know if this is still true in VFP -- and they will also allow you to switch
between case sensitivity and insensitivity at will. I do this all the
time...

>L<

0 new messages