Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT-Sql help needed
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00751340
Message ID:
00751360
Views:
25
> 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform