you should try to avoid using SELECT * in a production environment. it's
unnecessary process utilization. it's more efficient for SQL to look up
specified row names. might take longer to type, but it's the better way to
go. ;)

-----Original Message-----
From: Kevin Mansel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 2:05 PM
To: CF-Talk
Subject: RE: SQL query help


do a group by query

SELECT *
FROM Bars
GROUP BY BarColor

hth

kevin

~~~~~~~~~~~~~~~~~
Kevin Mansel
Web Developer
Fox Communications
[EMAIL PROTECTED]
DL : 425-649-1321
C : 425-346-7221



-----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