We help IT Professionals succeed at work.
Get Started

Return a Success/Failure to a Job based on a SQL query?

raterus asked
Last Modified: 2013-11-05
Here's my problem,

My company enables/disables SQL Jobs every holiday of the year.  Certain jobs can't run on holidays because they won't work.

I'd like to insert a step into this job that runs a query against a table (a holiday table), and if it finds the date, return a failure to the job (to which I'll end the job reporting success).

I can do all the math stuff, what I'm unsure about is how to return this success/failure to the Job execution from a sql statement.  I could write a console program to bomb on me, but that's too many layers for something so simple.

Any ideas?
Watch Question
Senior Database Administrator
This problem has been solved!
Unlock 1 Answer and 11 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE