Thread: Using Distinct
View Single Post
 
Old November 27th, 2007, 07:38 AM
prabodh_mishra prabodh_mishra is offline
Authorized User
 
Join Date: Sep 2003
Location: Delhi, Delhi, India.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prabodh_mishra
Default

No probs. use it

SELECT TEL, FIRSTNAME, LASTNAME, ADDRESS1, TOWN COUNTY
FROM [TABLENAME]
INNER JOIN (SELECT MAX(FIRSTNAME) TempPKEY FROM [TABLENAME] group by TEL) Temp
    ON [TABLENAME].FIRSTNAME = Temp.TempPKEY

Cheers,
Prabodh