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
 General SQL Server Forums
 New to SQL Server Programming
 how to write sql query

Author  Topic 

hema30
Starting Member

2 Posts

Posted - 2012-04-05 : 20:22:52
Employee Table

Employee No, char(8), Primary Key
Designation, int, Values = 1.Associate, 2.AVP, 3.VP, 4.SVP

Changes Table
Employee No, char(8), Foreign Key
Modified Date, Date, Primary Key
old status, int, same as designation in Employee Table
new status, int, same as designation in Employee Table

To do:

SQL function that receives from user input:
• Employee No.
• Date of reference
and returns the designation status as of the date of reference.

If no change in designation, there will be no record in the Changes Table

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-04-06 : 00:44:39
can we see what you tried yet? This is not a site providing assignment answers so unless you try it out yourself and then ask for part you need help with, dont expect spoonfed answers to be given!

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -