Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resetting a field to a certain value in SQL Server 2005

Status
Not open for further replies.

alan6895

Programmer
Aug 3, 2007
48
US
Hi all.
I'm making an app that will record a daily count of song plays. Each night at midnight, I've made a SQL Server 2005 job that runs. This job needs to reset all values in the "PlaysToday" column to 0. How can I do this with a SQL script that goes in the job editor? Thanks!
 
Add a transact sql job step with an update statement:

update <table name>
set PlaysToday = 0

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Thanks ArtieChoke. I've put the T-SQL statement into the job and it parsed fine. Once the DB actually starts recording data, I'll make sure it works. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top