Hi,

I have a table with an uniqueID, clientID,status, month,year and an eg of data could be:

1,79,5,7,2002
2,79,5,8,2002
3,25,5,4,2003
4,30,5,11,2002

From the data above, the clientID is occasionally repeated as they have the
same status on different dates. What I need to do is bring back only the first entry for that clientID, for each clientID, and I need to use only SQL to do it.

I have tried the following:

SELECT uniqueID, First(clientID) AS FirstOfclientID, month, year , status
GROUP BY uniqueID, month, year , status
HAVING (((status)=5));

but is still brings back duplicates....

Any helps/clues?

Many thanks,
Gill

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger



____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub


________________ http://www.wdvl.com _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to