Re: [sqlite] Wildcards

2006-06-13 Thread Alex Roston

DJ Anubis wrote:


Alex Roston a écrit :
 


Ideally I'd like to do something like:

"UPDATE card SET foo='100' where bar='ABC*';"

   


Use SQL standard construct:

UPDATE card SET foo='100' WHERE bar LIKE 'ABC%' ;

 


Excellent. Thank You. My problems are solved!!

Alex


Re: [sqlite] Wildcards

2006-06-13 Thread Alex Roston
Thanks Jay, but I've been there, and didn't see any examples, so I 
wasn't sure how it fit into the other commands. (I'm a little dull today 
- too many crisises - crisi? whatever... this week.)


Alex

Jay Sprenkle wrote:


On 6/13/06, Alex Roston <[EMAIL PROTECTED]> wrote:


Does SQLite have anything resembling a wildcard function? I need to
either get rid or modify a whole group of rows which have some common
elements in the primary key.

Ideally I'd like to do something like:

"UPDATE card SET foo='100' where bar='ABC*';"



see this page:
http://sqlite.org/lang_expr.html
look at "LIKE"





Re: [sqlite] Wildcards

2006-06-13 Thread Alex Charyna

I think you mean % not *
% is the wildcard.
-alex
On Jun 13, 2006, at 3:03 PM, Alex Roston wrote:

Does SQLite have anything resembling a wildcard function? I need to  
either get rid or modify a whole group of rows which have some  
common elements in the primary key.


Ideally I'd like to do something like:

"UPDATE card SET foo='100' where bar='ABC*';"

The construct above doesn't work, but is something like it possible?

Thanks,

Alex




Re: [sqlite] Wildcards

2006-06-13 Thread DJ Anubis
Alex Roston a écrit :
> Ideally I'd like to do something like:
>
> "UPDATE card SET foo='100' where bar='ABC*';"
>
Use SQL standard construct:

UPDATE card SET foo='100' WHERE bar LIKE 'ABC%' ;




Re: [sqlite] Wildcards

2006-06-13 Thread Jay Sprenkle

On 6/13/06, Alex Roston <[EMAIL PROTECTED]> wrote:

Does SQLite have anything resembling a wildcard function? I need to
either get rid or modify a whole group of rows which have some common
elements in the primary key.

Ideally I'd like to do something like:

"UPDATE card SET foo='100' where bar='ABC*';"


see this page:
http://sqlite.org/lang_expr.html
look at "LIKE"


RE: [sqlite] Wildcards in LIKE

2004-07-30 Thread Dennis Volodomanov
Ok, just found it - sorry...

But this does raise a question, I have UNICODE data, but it says that
LIKE only works correctly (i.e. case-insensitive) on 7-bit data. Can
someone tell me please how to make it work correctly for UNICODE as well
then?

As I read from the docs there, I have to override the like(x,y)
function, but I don't really know how, so any help here is appreciated
:-)

Thanks!

   Dennis

//
Software for animal shelters
http://www.smartpethealth.com
//
-Original Message-
From: Dennis Volodomanov 
Sent: Friday, July 30, 2004 3:47 PM
To: [EMAIL PROTECTED]
Subject: [sqlite] Wildcards in LIKE

Hello,

Does SQLite v3 support wildcards in the LIKE statement and if yes, how
do I express them? (sorry didn't find any info in the docs on this)

TIA

   Dennis

//
Software for animal shelters
http://www.smartpethealth.com
//