RE: cf_filter_duplicate_emails_from_query

2001-10-25 Thread Leon Greeff

Why don't you use distinct


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 25 October 2001 05:12
To: CF-Talk
Subject: cf_filter_duplicate_emails_from_query


Hello,

I am querying 3 tables that all contain email addresses.
What I want to do is send an email using all the email
addresses.  I just want to make sure there aren't 
duplicate e-mail when i sent the email.

I need some advice on how to remove duplicates.


---
i've got the cfquery ...

CFQUERY NAME=all_emails datasource=#datasource#
SELECT  db1_email, 
db2_email, 
db3_email
FROMdb1, 
db2, 
db3,
/cfquery  

--
I need some advice on how to remove dupplicates


--
I've got the beginning of the cfloop/cfmail ...

CFLOOP QUERY=all_emails 

cfmail to=? from=[EMAIL PROTECTED] 
subject=subject 

body 

/cfmail



~~
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cf_filter_duplicate_emails_from_query

2001-10-25 Thread Steven Monaghan

Would this work?

CFQUERY NAME=all_emails datasource=#datasource#
SELECT  db1_email as email_field, 
FROMdb1
union
SELECT  db2_email as email_field, 
FROMdb2 
union
SELECT  db3_email as email_field, 
FROMdb3
/cfquery  

CFLOOP QUERY=all_emails 
cfmail to=email_field from=[EMAIL PROTECTED] 
subject=subject 
   
body 

/cfmail

-
Steven Monaghan
Oracle DBA / Cold Fusion Developer
MSC Industrial Direct Co., Inc.
Melville, NY
[EMAIL PROTECTED]
http://www.mscdirect.com
-
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 11:12 AM
To: CF-Talk
Subject: cf_filter_duplicate_emails_from_query


Hello,

I am querying 3 tables that all contain email addresses.
What I want to do is send an email using all the email
addresses.  I just want to make sure there aren't 
duplicate e-mail when i sent the email.

I need some advice on how to remove duplicates.


---
i've got the cfquery ...

CFQUERY NAME=all_emails datasource=#datasource#
SELECT  db1_email, 
db2_email, 
db3_email
FROMdb1, 
db2, 
db3,
/cfquery  

--
I need some advice on how to remove dupplicates


--
I've got the beginning of the cfloop/cfmail ...

CFLOOP QUERY=all_emails 

cfmail to=? from=[EMAIL PROTECTED] 
subject=subject 

body 

/cfmail



~~
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cf_filter_duplicate_emails_from_query

2001-10-25 Thread Lon Lentz

  Have you tried unions?

  Another option is to convert the email query to a list and run it 
through a custom tag like cfx_listsort which can sort the list and 
dedupe it.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 11:12 AM
To: CF-Talk
Subject: cf_filter_duplicate_emails_from_query


Hello,

I am querying 3 tables that all contain email addresses.
What I want to do is send an email using all the email
addresses.  I just want to make sure there aren't 
duplicate e-mail when i sent the email.

I need some advice on how to remove duplicates.
~~
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



Re: cf_filter_duplicate_emails_from_query

2001-10-25 Thread Justin Scott

SELECT DISTINCT field FROM table

Where field contains the field where youe e-mail addresses are.

-Justin Scott, Lead Developer
 Sceiron Internet Services, Inc.
 http://www.sceiron.com


- Original Message - 
From: Dan Sullivan [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, October 23, 2001 4:47 PM
Subject: cf_filter_duplicate_emails_from_query


 hi,
 
 I am querying more than one table that all contain email addresses.
 I am merging all of these e-mail addresses into a CFMAIL email blast
 of all the email addresses.  I need advice on how to make sure there 
 aren't duplicate e-mail addresses after all the e-mails are merged
 and the email is lopped through each e-mail address.
 
 Should I use a list and check against the list before adding to the list?
 
 i've got the cfquery working ...
 
 I need the e-mail duplicate validation 8-)
 
 i've got the cfloop/cfmail working ...
 
 
 
~~
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