You have to login in order to post a reply to this topic.

2 replies [Last post]
rohlando
rohlando's picture
User offline. Last seen 1 year 29 weeks ago. Offline
Joined: 07/13/2010
Posts: 2

I am just either not seeing what I am doing incorrectly or just plain dumb.....

I am trying to do the following with the SQL statment:

Table: master
Table Fields: email_address,last_name,first_name

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\temp\emp_list_DB.accdb;Persist Security Info=False;

SELECT email_address FROM master WHERE last_name="test" AND first_name like "us%%"

This statement returns 0

SELECT email_address FROM master WHERE last_name="test" AND first_name like "user"

This statement returns 1

How do I use a wildcard in the SQL statement to match part of the name?

rohlando
rohlando's picture
User offline. Last seen 1 year 29 weeks ago. Offline
Joined: 07/13/2010
Posts: 2
Re: SQL LIKE statement

Found my mistake.

D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: SQL LIKE statement

 You needed to escape the percent characters I guess right?

:D

__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==