Hi,

Thanks for the reply.
I could not under the "/" what is the purpose of it?

regards
ragha



******************************************************************************************
 This email and its attachments contain confidential information from HUAWEI, 
which is intended only for the person or entity whose address is listed above. 
Any use of the information contained herein in any way (including, but not 
limited to, total or partial disclosure, reproduction, or dissemination) by 
persons other than the intended recipient(s) is prohibited. If you receive this 
e-mail in error, please notify the sender by phone or email immediately and 
delete it!
 
*****************************************************************************************

----- Original Message -----
From: Igor Tandetnik <[EMAIL PROTECTED]>
Date: Friday, August 17, 2007 9:55 am
Subject: [sqlite] Re: like operator

> RaghavendraK 70574
> <[EMAIL PROTECTED]> wrote:
> > we have given a web interface which receive delete request.
> > Now in the req we get "%" and in the delete impl we do this
> > delete from table where itemName like xxx.%;
> >
> > since the key is % the above statement becomes,
> > "delete from table where itemName like %.%";And result in fatal
> > problem of erasing all records.
> 
> Try
> 
> delete from table
> where itemName >= 'xxx.' and itemName < 'xxx/';
> 
> (a slash '/' character happens to come after period '.' in ASCII). Or
> 
> delete from table
> where substr(itemName, 1, length('xxx.')) = 'xxx.';
> 
> The first query would run much faster than the second if you have 
> an 
> index on itemName.
> 
> Igor Tandetnik 
> 
> 
> -------------------------------------------------------------------
> ----------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -------------------------------------------------------------------
> ----------
> 
> 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to