convert() or cast() in valentina

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Tue Feb 7 09:15:32 CST 2012


On 2/7/12 1:47 PM, "Giacomo Vernoni" <giacomo at way-out.it> wrote:

Hi Giacomo,

> It's all written in my first mail... but here it is again:
> 
>> I have a "img_name" field with image names, for example:
>> 
>> IMG_0010.jpg
>> myPicture10a.jpg
>> PIC_210_OK.jpg
>> 
>> I need to search for the images that ONLY have the number 10.
>> In my example, I should get the first two records (that have a "value" of
>> 10), excluding the last one that has a value of 210.

Okay,

I think this is rare task, and it can changes, today "10", tomorrow "30" ...
Then no need even try to make index on such expr ...

So question is how to find that

Answer can be 
                       [non digit or 1-9]  10 [non digit]

Because leading zeros still give us 10

Try something like this:

    WHERE f REGEX '[a-zA-Z1-9_]10[a-zA-Z_.]'


This assumes english chats also.
If not enough you can try use REGEX switches

    any  char               ...

Check docs of REGEX


-- 
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