If you want the results sorted on the DISTINCT column(s) there's no need to
include an order by. The SQL engine must sort the results on those fields to
determine uniqueness. It's probably a good practice to include an order by
anyway, just for clarity.

</rob>

-----Original Message-----
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 5:57 AM
To: CF-Talk
Subject: RE: CFQUERY Question to populate a drop down for search


> You could use:
>
> SELECT DISTINCT city FROM profiles

Not forgetting to ORDER BY the query, otherwise it can appear
pseudo-random

Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911

www.aspmedia.co.uk
www.aspevents.net

An ISO9001 registered company.

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************



______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to