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.
| Author |
Topic |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2006-09-25 : 09:19:15
|
| hi friends,i've a table named employeein this table, , the cl column should be updated by one at the end of the month.please give me query.here cl is casual leave.now when ever the month ends, the cl column should be incremented by one.like for upto this month, i've 6 cl. by the next month it should be incremented by onetable :eno ename CL3 vin 54 vinu 6thank you very much |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-09-25 : 09:21:44
|
| Why not hold the start date and calculate the value when it's used?to incrementupdate tbl set fld = fld + 1will add one to fld in all rows on the table.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2006-09-25 : 09:26:12
|
| in my table only that perticualr cl column should be updated by one at the last day of the month |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-09-25 : 09:44:03
|
| See the above update statement.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
sa
Yak Posting Veteran
77 Posts |
Posted - 2006-09-26 : 01:11:22
|
| see the UPDATE STATEMENT that was given to you.study about JOBS, there you can execute SQL STATEMENTS given a schedule. you might also study how to determine whether a given DATE is the LAST DATE of the currentmonth. |
 |
|
|
|
|
|