[V4RB2] What's wrong with SQLSelect?

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Mar 30 12:08:28 CST 2005


On 3/29/05 10:19 PM, "Kem Tekinay" <ktekinay at mactechnologies.com> wrote:

>> Now I set find = "NY", making the SQL command:
>> 
>>  SELECT * FROM Zip_Codes WHERE Zip_Code LIKE 'NY%' OR City LIKE 'NY%'
>>     OR State LIKE 'NY%'
> 
> And here is where the problem is. My e-mail reads like the above, but, in
> actuality, my select command read like this:
> 
>   SELECT * FROM Zip_Codes WHERE Zip_Code LIKE 'ny%' OR City LIKE 'ny%'
>      OR State LIKE 'ny%'

Just wonder, ZIP CODE field contains only numbers...

Or this is your general purpose algorithm ?

 
> It turns out that Valentina is case-sensitive, so I have to change it to
> this:
> 
>   SELECT * FROM Zip_Codes WHERE Zip_Code LIKE 'ny%' OR lower(City) LIKE
>      'ny%' OR lower(State) LIKE 'ny%'
> 
> This works, but is there a way to tell Valentina to always do
> case-insensitive searches?

Check feature db.CollationAttribute()
Describe in kernel.pdf and V4RB Refs.

You can e.g. For db assign

    db.CollationAttrinute( kStrength ) = kPrimary

Then all sorting and searches will ignore case and accents.

In the same time I think LIKE search will ignore this.
I think it is good idea to make LIKE search aware about that settings also.


> BTW, for what it's worth, this search takes about 115 ticks, but the same
> search in REALdatabase takes around 40 ticks. I'm starting to think that I
> must be missing some setting in Valentina.

:-) you have really interesting project on hands!

Valentina use UTF16, so files will be 2 times bigger.
But this still not explain I think.

We need profile this query to see where is breaks.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list