Problem with SQL Statement

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with SQL Statement

dannyp1202
Hello :)

I've got a problem with a SQL Statement in which I use a string comparsion.

I'd like to execute this:

SELECT * FROM PLZOrt WHERE PLZ LIKE "4153*"; But when I do this, I get
nothing back. But when I execute SELECT * FROM PLZOrt WHERE PLZ LIKE
"41539"; I get one record back. But this record must be given back, with the
first statement, too.

Does SQLite not support wildcards in WHERE clause?

Thanks in advance

Daniel


Reply | Threaded
Open this post in threaded view
|

Re: Problem with SQL Statement

Dan Kennedy
The two wildcards for LIKE are '%' and '_'.  

http://www.sqlite.org/lang_expr.html


--- [hidden email] wrote:

> Hello :)
>
> I've got a problem with a SQL Statement in which I use a string comparsion.
>
> I'd like to execute this:
>
> SELECT * FROM PLZOrt WHERE PLZ LIKE "4153*"; But when I do this, I get
> nothing back. But when I execute SELECT * FROM PLZOrt WHERE PLZ LIKE
> "41539"; I get one record back. But this record must be given back, with the
> first statement, too.
>
> Does SQLite not support wildcards in WHERE clause?
>
> Thanks in advance
>
> Daniel
>
>
>



               
__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html