The fstName is the column title, not the value. I'm using embedded Firebird.
On Fri, Nov 29, 2019 at 3:48 PM Richard Damon rich...@damon-family.org [firebird-support] <firebird-support@yahoogroups.com> wrote: > > > On 11/29/19 4:32 PM, Clyde Eisenbeis cte...@gmail.com [firebird-support] > wrote: > > > > Not sure what pattern is. If I am searching for two words I use OR or > > AND. > > > > "SELECT fstName, fiKeyID FROM Members WHERE lower(fstName) LIKE lower( > > @p0 ) AND lower(fstName) LIKE lower( @p1 ) " > > > > I prefer the word LIKE. Is easier to avoid errors vs. using '='. Are > > there advantages to using '='? > > > LIKE, because it is designed as a partial match, can't use a normal > index, so often ends up doing a table scan. > > = since it only matches the full field, can easily use an index, and if > an appropriate index is available, can avoid scanning the whole table. > > Also, in your above sample, fstName needs to match BOTH p0 and p1, which > isn't usual unless you are looking for the presence of both of two > strings in any order. > > -- > Richard Damon > > >