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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 create job in Enterprise Manager

Author  Topic 

bjornenbo
Starting Member

2 Posts

Posted - 2007-08-05 : 06:52:15
Hi,

My problem is to create a job in Enterprise Manager for Sql server 2000. I have created a store procedure that resets a users monthsum acount to 0. I would like to call this procedure every first day of the month in Enterprise manager job scheduling. The store procedure looks like this:

create proc ResetMonth
as
declare @MonthSum int
set @Manadssumma = 0
update User
set monthsum = @MonthSum

/alghero

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-08-05 : 12:08:37
Add this for the SP

IF DATEPART(DAY, CURRENT_TIMESTAMP) <> 1
RETURN

And call the SP every day with the schedule for the job.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -