Showing posts with label exist. Show all posts
Showing posts with label exist. Show all posts

Wednesday, March 21, 2012

rescheduling sql job

Hi,

I need to reschedule a job. SQL Books suggest using sp_update_jobschedule to update the job.

But the stored proc does not exist on my system and returns:
Could not find stored procedure 'sp_update_jobschedule'

Where can i find sp_update_jobschedule or its equivalent??

regards,
Henryyou can also go into SQL enerprise manager, expand your server name, expand management, and double click on jobs, right click on the job in question and click properties.|||Thanks for the reply Thrasymachus... But i need to reschedule on an event... say, when the admin resets the schedule through application.|||fromm Books Online:

"sp_update_jobschedule must be run from the msdb database.

Updating a job schedule increments the job version number."

Are you executing while logged into the msdb or is your sp execution fully qualified like 'EXEC msdb.dbo.sp_update_jobschedule @.parameters = etc...|||Thanks a million... I was looking for it in master

Monday, March 12, 2012

request Stored procedure filtered by Today

I am using SQL2005.There si a field called"EXPDATE". I need a query that shows the table info, if the date that is exist on "EXPDATE" is greater than today. In summary How to write a code that if EXPDATE> "today (I do not know what to put instead of today)" then show the contents of date

In SqlServer, today's function is GetDate()|||

Yes in T-SQL we use GETDATE() to get today'date, but remember that the GETDATE() function will return a DATETIME value which also contains time. So if you just want to compare date, you may need something like this (suppose the EXPDATE column is also DATETIME data type):

select * fromyourTable
WHERE DATEDIFF(d,GETDATE(),EXPDATE)>0