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:
00751367
Views:
24
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform