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:
01180083
Views:
17
>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
>
>
>
When I ran my two-step query (not the queries you have above) against your sample data I got the required results. I'm pretty sure the reason you are getting extra records is that your query includes contributors who make multiple donations to one of the two officials.

At any rate, I'm glad you got a solution from Sergey (surprise, surprise).


>For a simple task, this is turning into a "head scratcher". I guess I could always just use the brute force method! Aaaarrrrrggghhhhh
Previous
Reply
Map
View

Click here to load this message in the networking platform