AlphaPress Publishing
P.O. Box 5942 Albany, NY 12205
Tel: 518-250-3890
Email: alphapress@hotmail.com 


  

Section Menu 

Are you a University or College bookstore and want to order multiple books?  Email us at alphapress@hotmail.com or call us at 518-250-3890.  We will be happy to talk to you.  

Are you a professor and you need a sample copy?  We will be happy to send you a pdf or printed copy!  Email us at alphapress@hotmail.com.

Are you outside the United States?  We can ship multiple books worldwide in most countries.

  

 

 

The ? wildcard in combination with *

To contact the author click here

This article is from the book "Access 2007 Pure SQL

To download the sample database click here


The ? wildcard character in combination with *

Create a customer list using ? and * to create intricate search patterns 

Discussion:

The ? character matches any single character.  Though not used as much as the *, it can still make the difference and enable us to get exactly the results we want in certain cases. Usually we use it in combination with other wildcard characters. For instance, let us say we want to find names starting with "Da", have any character after the "Da" pattern, and the next letter is "e" followed by any number of characters.  That is "Da?e*".  This will give us results such as Darec, Datek, Dale, and Daleney.    

Code:

SELECT *

FROM customers

WHERE ((lastname) Like "Da?e*")
 

Result: