Click to See Complete Forum and Search --> : [RESOLVED] Help on sql for catsearch with wildcard


belebala
April 27th, 2009, 05:14 PM
Hello Everyone,

I have a problem with the sql statement that I'm trying to execute using the catsearch. My table and sql as follow:

Table
ID | Title
1 | Twinkle Twinkle Little Star
2 | Mary Had a Little Lamb
3 | London Bridge

select ID from Table where catsearch (Title, '%Star', null) > 0
- the above statement returns ID# 1

select ID from Table where catsearch (Title, 'S%ar', null) > 0
- but this statement returns nothing

How come the second statement returned nothing and how should I fix this?

I appreciate if anyone could help. Thanks.