Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Statment Needed
Message
De
10/01/2005 04:11:16
Walter Meester
HoogkarspelPays-Bas
 
 
À
07/01/2005 11:41:03
Todd Wolfe
Certified Marketing Services
Kinderhook, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
00975143
Message ID:
00975587
Vues:
15
Hi Todd,

In VFP9 it is simpler, but in VFP you can use:
SELECT NVL(A.Item, b.Item), count(a.Item)+Count(b.Item) FROM Items A FULL JOIN Items2 B ON .F. GROUP BY 1
Walter,





>Is it possible to write 1 select statement in VFP that will return the frequency of items across two tables. For Instance I have two separate tables that contain information about the use of a product. I want to see the total frequency of each item across the tables
>
>Table 1
>Item RespondentId SurveyId
>Item 1 1 1
>Item 1 2 1
>Item 1 3 1
>Item 2 1 1
>
>
>Table 2
>Item RespondentId SurveyId
>Item 1 1 2
>Item 2 2 2
>Item 1 3 2
>Item 2 1 2
>
>I would like 1 select statement that returns
>
>Item Freq
>Item 1 5
>Item 2 3
>
>
>Is this possible in VFP without appending the two tables first?
>
>Thanks for the help.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform