Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

How to change a field value when a year changes?

$
0
0

Hi Techies,

I am developing an application using windows forms.I am stuck at a point where I have to implement a functionality.

I have a table with fields like EMPID,DateofJoining,TOTAL_VACATIONS,TOTAL_HOLIDAYS,VACATIONS_LEFT,HOLIDAYS_LEFT.

Every employee will have 10 Holidays in a year if he joins the company in January and these are not forward able to the next year.And for every employee a vacation will be added when a month completes for first year and thereafter, 2 vacations will be added each month from the second year.So in the table based on a joining date for a empployee,the no.of holidays have to be changed to zero when he completes a year and a vacation need to be added when he completes a year.

So can you guys please tell me how can I implement the above functionality?

Thanks in advance.

Regards,

Niranjan


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>