Using Like in a select
Ivan Smahin
ivan_smahin at paradigmasoft.com
Wed Dec 26 01:18:57 CST 2007
Hello Joseph,
Wednesday, December 26, 2007, 4:47:34 AM, you wrote:
> and customers.accountname LIKE ' %CPS% '
> But this does:
> and customers.accountname = 'CPS '
> The only difference is line 6, I am trying to use LIKE but it returns
> no results,
> but it should. I need the LIKE statement to work in this situation, is
> this a bug?
> If so any suggestions for a workaround?
A lot of difference. Look - in "like" case you are looking for any
record with field started from space. I think there is no such
records.
And only then you apply "any amount of any symbols pattern" - '%'
Seems intention was : and customers.accountname LIKE '%CPS%'
--
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com
More information about the Valentina
mailing list