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 a SQL Job

Author  Topic 

JeffS23
Posting Yak Master

212 Posts

Posted - 2008-04-09 : 14:45:09
I have never created a SQL Job before. I would like to run the following script every hour or so ....

UPDATE PatientVisit SET VisitOwnerMId = NULL WHERE VisitOwnerMId = '695'

Can anyone assist me on how to add this job? This would be in SQL 2000

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-04-09 : 14:56:40
Go to SQL server agent -jobs -create new job
Put your query and setup schedule.should be fine
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2008-04-09 : 16:33:44
Wouldn't it make more sense to fix whatever is inserting/updating the data incorrectly (proactive) as opposed to fixing it after the fact (reactive)? Just asking because you seem to know the issue, it shouldn't be that difficult to correct it (or am I missing something?).

Terry
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-04-09 : 16:57:24
Agreed. He doesn't need to create a job for that.
I am just showing him how to create a job as per his question
Go to Top of Page
   

- Advertisement -