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:
00751365
Vues:
19
>> If there can be more than one People record does that record contain a PeopleId field?
>>
>
>Yes it does, and it contains the same value in that field for each row that applies to that record. I am only wanting the row once. The field is the first field in the row, so I just 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'
>
>and that seems to create the correct rows in the cursor. I'm just not use to using GROUP BY 1 to get rid of duplicates like this.
>
>> Maybe you could limit the select from the People table?
>>
>I don't know quite what you meant by this.
>
>Thanks,
>Mel Cummings

The problem here, is that this SQL is not ANSI compatible and therefore you have to use special mode in VFP8 to make it work.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform