Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread LIKE query different in dbisam 4 and 3?
Mon, Dec 4 2006 7:50 PMPermanent Link

Marilyn Fleming
I am porting a large app from delphi 7/dbisam 3 to delphi 2006 (win32)/dbisam 4, and have hit an anomaly. In dbisam 3, select * from table where fld LIKE '%abc%'  was case insensitive,
so returned ABCxxx, abcxxx, Abcxxx, etc.  In dbisam 4, it is case-sensitive, returning only abcxxx.

Clearly I could fix it by saying upper(fld) LIKE %ABC%, but seems like that would make my full-text index on fld useless. (The table has not changed. Just did an UpgradeTable on it).

Any suggestions?

Tue, Dec 5 2006 4:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Marilyn,

<< I am porting a large app from delphi 7/dbisam 3 to delphi 2006
(win32)/dbisam 4, and have hit an anomaly. In dbisam 3, select * from table
where fld LIKE '%abc%'  was case insensitive, so returned ABCxxx, abcxxx,
Abcxxx, etc.  In dbisam 4, it is case-sensitive, returning only abcxxx.

Clearly I could fix it by saying upper(fld) LIKE %ABC%, but seems like that
would make my full-text index on fld useless. (The table has not changed.
Just did an UpgradeTable on it). >>

Full-text indexes don't use LIKE at all.  LIKE doesn't use any indexes, in
fact. As you indicated, what you need to do is convert the expression to
this:

UPPER(fld) LIKE '%ABC%'

--
Tim Young
Elevate Software
www.elevatesoft.com

Image