I have a persons table with a personid. As the individuals addresses, phone numbers etc. change new records are added to the address, phone number tables etc, linked by personid. The addresses, phones tables have sequence numbers to indicate the most recent entry. There must be a simple sql statement to select name from persons and the address with the highest seq number from the address or phone table. it would be nice if the database designer had provided an active field but they didnt and I dont have the option of changing the table structure.<br>
<br>
ive tried all kinds of variations of selects like where person.id=address.id and seqnum=greatest(seqnum)<br>
<br>
but I cant get the right combination.<br>
<br>
any suggestions would be appreciated...<br>
<br>
<br>
<br>
<br>
ive tried all kinds of variations of selects like where person.id=address.id and seqnum=greatest(seqnum)<br>
<br>
but I cant get the right combination.<br>
<br>
any suggestions would be appreciated...<br>
<br>
<br>
<br>