You're welcome.
>Sergey,
>
>Thanks a lot for your further advice.
>
>KM
>
>
>>I think you should change ORDER BY clause to
ORDER BY lastname, firstname, CustID
otherwise you could miss some records under following conditions
>>- First and last name are the same
>>- There are more than 2 such records
>>- CustID values arent in sequential order in those records.
>>
--sb--