Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Statement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01179984
Message ID:
01180083
Vues:
18
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform