>>>I am trying just to grab a person with a address, but I get several records for a person with several address records. I generally have to create a index on the id unique and that works fine.
>>
>>Are you trying to get just one shipping address for each person, or are you trying to get just the people with AT LEAST one shipping address, in other words excluding people who have no shipping addresses?
>
>I am just grabing people with at least one address record, excluding all
>people with no address records.
Try this to get just the people with at least one address record:
SELECT ID ;
FROM PERSONS ;
WHERE ID IN (SELECT ID FROM ADDRESS) ;
INTO TABLE Q1
To get people without any addresses at all, just add the NOT clause:
SELECT ID ;
FROM PERSONS ;
WHERE ID NOT IN (SELECT ID FROM ADDRESS) ;
INTO TABLE Q1
Chris McCandless
Red Sky Software