Monday, January 7, 2008

How to use the LIKE clause in SQL Query in MS Access

This article will show you how to use the LIKE clause in SQL to search all the related records in a table that begin with, end with or contain a certain letter.

Normally for LIKE statement, the wildcard character is “%”, but please take note that, in MS Access, you have to use the wildcard “*” instead of “%”, else it is not working.

Here are some examples using the LIKE clause:

LIKE [First character that you want to search] & “*”
LIKE “*” & [Certain character that you want to search] & “*”

0 comments:

 

Get paid for your opinions! Click on the banner above to join Planet Pulse. Its totally free to sign up, and you can earn UNLIMITED. Find out more by visiting PLANET PULSE.
July Code Blog Copyright © 2010 Blogger Template Designed by Bie Blogger Template