Question

I have a field in database table, let say, Counter. Initially its value is 0. After every transaction, the value is incremented by 1. But at the end of day I want to update this value to 0 again.

e.g. If we have total 10 transactions in a day, the counter will be 10 offcourse. I want that Counter to be 0 again at 12 am every day.

Thanks

Was it helpful?

Solution

you can Create a Job for that..

For More information visit http://technet.microsoft.com/en-us/library/ms190268.aspx

OTHER TIPS

You can write a stored procedure for resetting the counter, hang it on the Job in SQL Server Agent, and then set a schedule that suits you

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top