Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT-Sql help needed
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00751340
Message ID:
00751367
Vues:
19
>You can run your first select, then select distinct from it. Otherwise you >have to group by People.PeopleID and each field except for ID should be >some aggregative function, like min, but the result may be incorrect in >such case...

The first field in the cursor row (peopleid) is the one I need to be unique, so I added the GROUP By 1 as in the following:
	SELECT People.*,  Postal.address1, Postal.address2, Postal.city, ;
			Postal.state, Postal.zip, Postal.country ;
			FROM  appdata!People ;
			INNER JOIN appdata!Postal ;
			ON  People.postalid = Postal.postalid ;
                        GROUP BY 1 ;
			INTO TABLE THISFORM.MyTableFolder+'MyTable'
This appears to give me the results I would expect.

You think this is the correct way to get rid of the duplicates in this situation?

Mel Cummings
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform