Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread LIKE operator returns no results without percent wildcard.
Sat, Mar 10 2007 1:50 AMPermanent Link

Dave M
Sorry for accidentally posting twice (once in DBISAM general).

SQL operator LIKE can not return exact match or single character wildcard without %.

Sql below returns no results for Jones:
--------------------------------------------
SELECT * from sometable
WHERE lastname = 'Jones'

SELECT * from sometable
WHERE lastname = 'J_nes'


This SQL returns Jones (plus records such as Jones/Smith):
-------------------------------------------------------------------
SELECT * from sometable
WHERE lastname = 'Jones%'

SELECT * from sometable
WHERE lastname = 'J_nes%'

Dave M
Mon, Mar 12 2007 4:45 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Dave,

<< SQL operator LIKE can not return exact match or single character wildcard
without %. >>

Got it.  The workaround is to use the equals operator instead for now.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image