Will- try this:

SELECT town_name
FROM towns
WHERE town_name LIKE '#form.letter#%'

The % tells it to match the letter with anything following it.

If you wanted to match a word or word part which could be anywhere in the
name, you would use LIKE '%#form.letter#%'


HTH
D

*****************************
Diana Nichols
webmistress
http://www.lavenderthreads.com
770.434.7374

"One man's magic is another man's engineering" --Lazarus Long



-----Original Message-----
From: W Luke [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 25, 2001 1:00 PM
To: CF-Talk
Subject: Quick query question (qqq)


I have a list of towns (3000 or so), and need to output them per letter in
the alphabet. For instance, I might need to pull up all towns starting with
the letter M.  To choose the letter, there will be a drop down box with A-Z
in it (form.letter)

How can I do this in my query?

Cheers

Will
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to