>Hi all,
>
>I have a single table that I would like to find a single record for each same name, same first name, same birthday, different address that are created those persons ID:
>
>For example :
>
>mytable contains only an ID and city :
>
>Name, First, Birthday, address = ID and city
>
>Joe Doe 19601231 mycity = JDOE19601231001 mycity
>Joe Doe 19601231 yourcity = JDOE19601231002 yourcity
>Joe Doe 19601231 hiscity = JDOE19601231003 hiscity
>
>Joe Doe 19651231 hercity = JDOE19651231002 hercity
>Joe Doe 19651231 sexcity = JDOE19651231001 sexcity
>
>Jay Doe 19601231 joecity = JDOE19601231001 joecity
>Jay Doe 19601231 jaycity = JDOE19601231002 jaycity
>Jay Doe 19601231 ourcity = JDOE19601231003 ourcity
>
>
>Joe Doe 19651231 fullcity = JDOE19651231001 fullcity
>Joe Doe 19651231 lastcity = JDOE19651231002 lastcity
>Joe Doe 19651231 firstcity = JDOE19651231004 firstcity
>
>I could have a hundred records to sort out by the last 3 digits of their id started from 001,002,003,004,005 .....100 and different addresses that separated each id.
>
>I really appreciated that someone could help me with the SQL command to do this.
I'm not exactly sure what you're looking for, but if you want to find one record for each value of the first 12 characters of ID, you can get a list of the unique values with:
SELECT DISTINCT LEFT(ID, 12) ;
FROM MyTable ;
INTO CURSOR csrUniqueID
You can then use that list to filter the original table in some way.
If you need more help, tell us exactly what the result you want is, and whether you're trying to change the original table or create something new.
Tamar