>- see footer for list info -<
Thanks Duncan, you are the man.
I just needed a firm slap.

Thank god for <CFOUTPUT> and its group attribute!

Allan

-----Original Message-----
From: Duncan Cumming [mailto:[EMAIL PROTECTED] 
Sent: 03 February 2006 10:14
To: [email protected]
Subject: Re: [CF-Dev] Distinct records in SQL


>- see footer for list info -<
is this what you're trying to do:

select email, firstname, surname, telephone etc
order by email, surname, firstname

<cfoutput query="getstuff" group="email">
<strong>#getstuff.email#</strong><br>
<cfoutput>
#getstuff.firstname# #getstuff.surname#, #getstuff.telephone# etc<br>
</cfoutput> <br> </cfoutput>


Duncan Cumming
New Media Developer
Customer Relations Management / Education
Fife Council
700 4105 / 01592 414105

>>> "Allan Cliff" <[EMAIL PROTECTED]> 02/02/2006 16:49 >>>
>- see footer for list info -<
Am having brain failure at the end of today.

I have a table with

ID, name, address, postcode, email, etc

I want to write a query to select DISTINCT emails from the db plus name,
postcode and id numbers.

Have tried DISTINCT
SELECT DISTINCT top 5 Email, firstname, surname, telephone, address,
postcode, id but give duplicates

Have tried group by but no joy.

Please could any kind soul point me in the right direction. (2 queries)

Thanks
Allan
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo 

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help

>-<


**********************************************************************
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 and should not be disclosed to any other party. 
If you have received this email in error please notify your system
manager and the sender of this message.

This email message has been swept for the presence of computer viruses
but no guarantee is given that this e-mail message and any attachments
are free from viruses.

Fife Council
Tel: +44 (0) 1592 414141
**********************************************************************
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help

>-<

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to