Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selecting by the first letter of a lastname 1

Status
Not open for further replies.

PTmon

IS-IT--Management
Mar 8, 2001
284
US
Hi, I'm writing a simple page to list contact information. I need to query a field called lname from and url variable. list.cfm?lname=A

What I want to do is list all the lastnames that begin with the letter specified in the url variable. I"m not sure how to write the query. Your help would be appreciated :)
thanks,
PT
 
in the where clause do this:

WHERE lname LIKE '#URL.LName#%'
that will find url string at the LEFT of the field,

WHERE lname LIKE '%#URL.LName#'
that will find url string at the RIGHT of the field,

WHERE lname LIKE '%#URL.LName#%'
that will find url string at the ANYWHERE in the field

make sense?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top