Pauldohert
05-30-2008, 04:37 AM
IN access I have
SELECT First(Table1.EmailAdd) AS FirstOfEmailAdd, Table1.EmailAdd, First(Table1.OrgID) AS FirstOfOrgID, First(Table1.ContactID) AS FirstOfContactID, First(Table1.Name1) AS FirstOfName1, First(Table1.Name2) AS FirstOfName2
FROM Table1
GROUP BY Table1.EmailAdd;
Basically I am getting the unique emails then adding back in the other fields from the first record found with that email.
How do I do this in SQL server?
Ta
SELECT First(Table1.EmailAdd) AS FirstOfEmailAdd, Table1.EmailAdd, First(Table1.OrgID) AS FirstOfOrgID, First(Table1.ContactID) AS FirstOfContactID, First(Table1.Name1) AS FirstOfName1, First(Table1.Name2) AS FirstOfName2
FROM Table1
GROUP BY Table1.EmailAdd;
Basically I am getting the unique emails then adding back in the other fields from the first record found with that email.
How do I do this in SQL server?
Ta