Chad, you'd want to do this:

SELECT DISTINCT COLOR
FROM tblWhatever
WHERE NAME = 'bar'

david

-----Original Message-----
From: Chad Gray [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 1:16 PM
To: CF-Talk
Subject: SQL query help


I have a database similar to this:

SKU     NAME    COLOR   STYLE
1       bar     blue    12"
2       bar     blue    6"
3       bar     blue    5"
4       bar     red     12"
5       bar     red     6"
6       bar     red     5"


I want to find all the colors that 'bar' comes in.

If i do a query on this to find all the colors for the NAME 'bar'.  I get:
blue
blue
blue
red
red
red

How do i get results like this?
blue
red

Thanks in advanced
Chad
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to