Finding non-duplicate records?
From: Billz89 (Billz89_at_discussions.microsoft.com)
Date: 06/15/04
- Previous message: Maria: "Re: Finding tables referenced in a Stored Procedure"
- Next in thread: Rohtash Kapoor: "Re: Finding non-duplicate records?"
- Reply: Rohtash Kapoor: "Re: Finding non-duplicate records?"
- Reply: Vishal Parkar: "Re: Finding non-duplicate records?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 15 Jun 2004 09:08:02 -0700
Hello.
I have two tables and in each e-mail addresses; one for newsletter subscribers, the other for contest entrants. I want to send a special one-time-only newsletter to the contest entrants who are not subscribers of our newsletter. I have been able to pull the duplicate records for the tables, now I just need to pull the non-duplicate e-mails from the contest table. I tried this:
SELECT Contest.EMAIL AS Expr1
FROM Contest CROSS JOIN
NewsLetter.dbo.pgd_Members
WHERE (NOT EXISTS
(SELECT EMAIL
FROM Contest
WHERE NewsLetter.dbo.pgd_Members.Email = Contest.EMAIL))
I created the above based on research I did in this forum, but I did something wrong as the query is stuck in a loop. I stopped at over 1 million rows. The Contest table has 4,000 records.
Thanks for the help.
Bill
- Previous message: Maria: "Re: Finding tables referenced in a Stored Procedure"
- Next in thread: Rohtash Kapoor: "Re: Finding non-duplicate records?"
- Reply: Rohtash Kapoor: "Re: Finding non-duplicate records?"
- Reply: Vishal Parkar: "Re: Finding non-duplicate records?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|