SQL Server select distinct
Posted on 2013-12-10
In SQL Server, how do you select a distinct with multiple columns? I want distinct employeeid, but it's not the first column in my select, so it doesn't seem to work.
select count(*) as seqnumber, Recordtype, CoID, EmployeeID, EventCode, CreationDate
I want to select distinct employeeids, that is, if an employeeid is in there more than once, I only want it once.