Domanda

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

È stato utile?

Soluzione

you can Create a Job for that..

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

Altri suggerimenti

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top