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
>
> 
>
  • [firebi... cte...@gmail.com [firebird-support]
    • Re... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
    • Re... Richard Damon rich...@damon-family.org [firebird-support]
      • ... Clyde Eisenbeis cte...@gmail.com [firebird-support]
    • Re... Kjell Rilbe kjell.ri...@marknadsinformation.se [firebird-support]
      • ... Clyde Eisenbeis cte...@gmail.com [firebird-support]
        • ... Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
          • ... Clyde Eisenbeis cte...@gmail.com [firebird-support]
            • ... Richard Damon rich...@damon-family.org [firebird-support]
              • ... Clyde Eisenbeis cte...@gmail.com [firebird-support]
                • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
                • ... Tjioe Hian Pin thp_p...@yahoo.com [firebird-support]
                • ... Richard Damon rich...@damon-family.org [firebird-support]
            • ... Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
              • ... Clyde Eisenbeis cte...@gmail.com [firebird-support]

Reply via email to