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.
| Author |
Topic |
|
kvt.aravind
Starting Member
24 Posts |
Posted - 2010-08-24 : 09:46:34
|
| Hi all,Am using following query in scheduled jobsDelete from tata_travel_ticketinfo Where tata_travel_ticketinfo.book_id in (select tata_travel_ticketinfo.book_id from tata_travel_ticketinfo inner join tata_travel_bookticketnew on tata_travel_bookticketnew.book_id = tata_travel_ticketinfo.book_id and tata_travel_ticketinfo.Status in ('open') and tata_travel_ticketinfo.created_on < dateadd(dd,-90,getdate()))go which will be exceuted automatically once in a month(ie., 2day of every month)and it will delete the records which are beyond 90 days. but if it is doesnot executed next month due to some problems then how can i delete the recordsAravind.T |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2010-08-24 : 11:11:36
|
| I'm not sure I understand your question... But, you could execute the job or the sql manually. |
 |
|
|
slimt_slimt
Aged Yak Warrior
746 Posts |
Posted - 2010-08-24 : 11:24:03
|
| you can track execution of your jobs and see the results of execution. in case of failed job execution, you can still run query manually. ie. 2day of the month.you can even set some IF statements in case of that.if SQL Agents is not running i suggest you to go blame the DBA :) |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-08-24 : 13:15:18
|
| If it just deletes "everything OPEN which was created more than 90 days ago" why not schedule it to run every night? Then the delete job is small, and if it doesn't run for a few days, even, it won't make much difference. |
 |
|
|
|
|
|