With the LIKE statement.
SELECT username
FROM table
WHERE username LIKE 'm%'
The % symbol is a wildcard.
You can also use
WHERE username BETWEEN 'm' AND 'z'
This will give you all the records that are between m and z.
At 05:59 PM 8/25/2001 +0100, you wrote:
>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