Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get first name for the same address
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Get first name for the same address
Divers
Thread ID:
00271361
Message ID:
00271361
Vues:
49
Hi

Need to get all records that consist of all couples that
live under the same address

The first query need to get records with the combination
of the two first names. It could be let say 5 JOEs with
1 VERONICA under same address.

Appreciate your input.

Doron

SELECT ;
AK.cVot_First ,;
AK.cVot_LastN ,;
AK.cVot_Stree ;
FROM ;
AK ;
WHERE AK.cVot_First IN ("JOE","VERONICA") ;
HAVING COUNT(*)>1 ;
GROUP BY AK.cVot_Stree ;
INTO CURSOR Doron ;
ORDER BY AK.cVot_Stree NOFILTER

IF _TALLY >0
SELECT ;
AK.cVot_First ,;
AK.cVot_LastN ,;
AK.cVot_Stree ;
FROM ;
AK ;
JOIN Doron ;
ON AK.cVot_Stree==Doron.cVot_Stree ;
WHERE AK.cVot_First IN ("JOE","VERONICA") ;
INTO CURSOR Ica ;
ORDER BY AK.cVot_Stree
ENDIF
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform