I have an employee database that has year to date information in it, it has a record for each payroll run through the year, which means multiple records for each employee.
I need help with an sql statement that will give me all the fields in the table, but only one record per social security number.
When I try to use the distinct(social_security_number) on the select it ONLY returns the social_security_number field, and if I try to select distinct with a comma and the *, it returns everyone of the records, like it is trying to find distinct records on ALL the fields combined.
Please help, I have spent HOURS and multiple select statements, only to lead to frustration.
Thanks in advance.
Ferlin.
I need help with an sql statement that will give me all the fields in the table, but only one record per social security number.
When I try to use the distinct(social_security_number) on the select it ONLY returns the social_security_number field, and if I try to select distinct with a comma and the *, it returns everyone of the records, like it is trying to find distinct records on ALL the fields combined.
Please help, I have spent HOURS and multiple select statements, only to lead to frustration.
Thanks in advance.
Ferlin.