A
alwayshouston
Hi All
I have a table that records employee salary. First time when someone
loads the data, the Original field is marked "Y" and Modified field is
marked "N". If that particular employee record is updated, the
original field is update "N" and Modified field is updated with "Y".
Below is the table structure with records in which employee ID 100 is
modified:
EmpID Salary Original Modified
100 1000 Y N
200 2000 Y N
300 3000 Y N
100 1500 N Y
I need to write a query that would give me the most updated/modified
record for each employee as below:
EmpID Salary
100 1500
200 2000
300 3000
Can someone please help me write a query that would generate above
output? Thanks in advance!
I have a table that records employee salary. First time when someone
loads the data, the Original field is marked "Y" and Modified field is
marked "N". If that particular employee record is updated, the
original field is update "N" and Modified field is updated with "Y".
Below is the table structure with records in which employee ID 100 is
modified:
EmpID Salary Original Modified
100 1000 Y N
200 2000 Y N
300 3000 Y N
100 1500 N Y
I need to write a query that would give me the most updated/modified
record for each employee as below:
EmpID Salary
100 1500
200 2000
300 3000
Can someone please help me write a query that would generate above
output? Thanks in advance!