Icon View Incident Report

Serious Serious
Reported By: Mats Berggren
Reported On: 8/24/2009
For: Version 2.02 Build 15
# 3058 LIKE Producing Incorrect Results for Partial-String Matches with Certain Languages

I get weird results when I search a text field in one of my database tables. The table "Perstab" is quite large (750655 records). Each record contains information about one person. The field "fornamn" (varchar (80) COLLATE SVE_CI) contains given names for persons.

In my application I use the function TEDBTable.FindNearest to search the field "fornamn".
I get identical results when I use a SQL SELECT LIKE statement from the EDB Manager.

For some search values everything works fine (Example 1 and 2).

But when I use other search values I get weird results (Example 3, 4, 5, 6, and 7).

Example 1:
select fornamn from Perstab where fornamn like 'rob%'

Result: 411 hits
Various names starting with 'rob'

Example 2:
select fornamn from Perstab where fornamn like 'robert%'

Result: 319 hits
Various names starting with 'robert'

Example 3:
select fornamn from Perstab where fornamn like 'v%'

Result: 3 hits
V.
V.
V(    )?

Example 4:
select fornamn from Perstab where fornamn like 've%'

Result: No records found

Example 5:
select fornamn from Perstab where fornamn like 'ver%'

Result: 17 hits
Vera (17 times)

Example 6:
select fornamn from Perstab where fornamn like 'vern%'

Result: 3 hits
Vern (3 times)

Example 7:
select fornamn from Perstab where fornamn like 'verner%'

Result: 33 hits
Verner (33 times)



Comments Comments
The problem was partially with ElevateDB and how it was evaluating the LIKE operator for partial-string matches, and partially with how the Swedish collation works. The fix for this problem will cause the LIKE operator to perform a bit slower with partial-string matches (LIKE 'test%' or LIKE 'test_').


Resolution Resolution
Fixed Problem on 8/24/2009 in version 2.03 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image