Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 how to find out

Author  Topic 

shubhada
Posting Yak Master

117 Posts

Posted - 2007-04-08 : 22:23:55
Hi,
I have one table employee with following column

EmpId EmpName Salary Department
1 ABC 2000 Quality
2 XYZ 5000 HR

Every year salary of employee get changed.
Now how I can find out the salary of Employee ABC in Year 2005.
Sppose above data is for Year 2007.THis table don't have any date column.


SQLTeam

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-08 : 22:26:38
where do you keep the salary of ABC for Year 2005 ?


KH

Go to Top of Page

shubhada
Posting Yak Master

117 Posts

Posted - 2007-04-09 : 01:48:42
it is now updated ..
is it possible to find out with timestamp?

SQLTeam
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-09 : 01:51:55
"is it possible to find out with timestamp?"
you mean you have a timestamp column in the employee table ?


KH

Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-09 : 04:24:43
If you have simply updated the old Salary with new value and you want to retrieve previous value, it is not possible. If you are maintaining separate rows timestamp or datewise, then only you can retrieve old value.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -