Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Statement
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01179984
Message ID:
01180048
Views:
15
Thanks Rich,

I'm afraid I'm still getting more data returned than should be. Here's another look at the data.

name official date amount
ADAMS, J. KEVIN Mark Luttrell 3/20/2006 500
ADSTAFF LLC Mark Luttrell 5/28/2003 1000
AFSCME Rickey Peete 5/28/2003 250
AFSCME Rickey Peete 5/28/2003 300
AJDC, LLC Rickey Peete 2/14/2005 250
ARMSTONG ALLEN Mark Luttrell 2/14/2005 500
ARMSTONG ALLEN Rickey Peete 2001 500
ARMSTONG ALLEN Rickey Peete 2002 500
AUTOZONE INC. Mark Luttrell 7/18/2002 1000
AVIOTI, PETE Rickey Peete 5/1/2003 200
BAAB, BILLY Mark Luttrell 5/1/2003 1000
BAAB, BILLY Rickey Peete 5/1/2003 250


From this group, I should only return the following:

ARMSTONG ALLEN Mark Luttrell 2/14/2005 500
ARMSTONG ALLEN Rickey Peete 2001 500
ARMSTONG ALLEN Rickey Peete 2002 500
BAAB, BILLY Mark Luttrell 5/1/2003 1000
BAAB, BILLY Rickey Peete 5/1/2003 250

I need every instance of any contributor who has given to both candidates.

Even using a two step process, I get more results than I asked for:
SELECT name,official,date,amount FROM cmoney INTO CURSOR xxx WHERE official in (?o1,?o2)  ORDER BY name,official,date

SELECT name,amount,official,date FROM xxx;
 WHERE name IN (SELECT name FROM xxx;
                 GROUP BY name;
                 HAVING count(*) > 1) ORDER BY name,official,date
For a simple task, this is turning into a "head scratcher". I guess I could always just use the brute force method! Aaaarrrrrggghhhhh
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform