T-SQL Code

Here is a simple query run on the system msdb database that shows history of all the jobs that ran. I put a WHERE clause because I am interested in one particular job id.

SELECT TOP 1000 [instance_id]






FROM [msdb].[dbo].[sysjobhistory]

where job_id = '5612777E'

The job_id '5612777E' runs every five minutes so I need to have the query modified to check if the job id ran within last five minutes from current server time and display the status whether it ran successfull/fail/cancled etc.

Purpose of this query is to basically run and it should tell is if "5612777E' ran in last fine minutes or it didnt.

This should be quite easy for someone who is good with T-sql ( Please note we are on MS SQL Server 2008R2 and not oracle so code should be in T-sql)

Habilidades: SQL

Veja mais: t sql jobs, top in oracle sql, sql top oracle, sql oracle top, sql code oracle, jobs with oracle, jobs on oracle, jobs in oracle, t-sql with, t-sql in, sql server job, oracle sql with, jobs oracle, t-sql;, Sql code, oracle job, status code, sql select select, code status, 2008r2, sql 2008r2, oracle select query, oracle status, check sql, select oracle

Acerca do Empregador:
( 1 comentário ) Woodland Park, United States

ID do Projeto: #5145909

Concedido a:


[TASK DONE] Dear Sir, I'm MCITP ms sql server,I'm interested on doing this task. Kind Regards, NourElDeen

$15 USD em 0 dias
(11 Comentários)

26 freelancers are bidding on average $23 for this job


Dear, I am database and query writing expert. I can modify you current query. Please award me this project. Thanks

$33 USD in 0 dias
(71 Comentários)

Dear Sir, Please try following statement and get the result. I have given SQl code . if its work please pay me else reply me I'll do any SQL task for you SELECT deqs.last_execution_time AS [Time], [url removed, login to view] AS [ Mais

$15 USD in 10 dias
(29 Comentários)

Hi, I'm very interested helping you resolving your sql query, I have years of experience in SQL and database administration, modeling, and manipulating, please do not hesitate to check my portfolio, there is some sampl Mais

$34 USD em 1 dia
(8 Comentários)

Hi I have more than 10 years experience in MSSQL database administration. Please see my profile. Thanks.

$35 USD in 3 dias
(8 Comentários)

Hi. I am certified MS SQL Server expert and have spent great deal of my life in performing administrative tasks. Would be glad to help you with this project. Regards, Yuri.

$35 USD in 2 dias
(16 Comentários)

I will provide you 2 solutions: - first the simple query - second a stored procedure with minutes and job_id as parameter. Best Regards, Luca.

$20 USD in 2 dias
(3 Comentários)

Hi, I am an individual freelance, having more than 10yrs of exp in developing applications, window & web based, using .Net (C#.Net, Asp.Net (MVC), XML, WPF, WCF (Webservices) and SQL Server etc). By worked with Mais

$20 USD in 0 dias
(2 Comentários)

Hello, I have been working with SQL Server for the last 4 years, I can help with this query. We just have to add some formatting functions and see if the difference in minutes between now and the run date& time is sma Mais

$15 USD in 0 dias
(2 Comentários)

Hi, I'm working at a university for nearly 8 years and my job is to create custom reports and exports using Transact-SQL, so queries like this, are everyday task for me and I expect no troubles or so. I'm ready to sta Mais

$15 USD in 2 dias
(1 Comentário)

Its really easy... Let me know how you will be notified? It can be a email sent from the database as well (for standard or enterprise version). Or let me know what will be the source of informing you. Thanks

$13 USD em 1 dia
(2 Comentários)

Hi, Can be done nicely within your expected time & quality. I have 8.5+ years of experience in .net technologies specially in, c#, mvc, ms sql, wcf, web services along with reach experience in basic web tec Mais

$30 USD em 1 dia
(3 Comentários)

I have bachelor and master degrees in IT. My Primary skills include Java, VB/.NET, Delphi, and PHP. Also database skills include MS Access, MySQL, and Oracle. My Other skills include server and network administration a Mais

$10 USD em 1 dia
(1 Comentário)

Dear Sir, I am new to freelancer, but I have a total work experience of around 14 years. I can write any type of T-SQL within a less time perfectly. I just started freelancer. Please encourage me. As a sample soluti Mais

$25 USD in 10 dias
(0 Comentários)

A proposal has not yet been provided

$25 USD in 3 dias
(0 Comentários)

Propunerea nu a fost încă furnizată

$25 USD in 10 dias
(0 Comentários)

A proposal has not yet been provided

$28 USD in 5 dias
(0 Comentários)

Hi I have already the query. Please hire me and I will send to you. Best Regards Ghazi Oualha

$10 USD in 0 dias
(0 Comentários)

Hi, I have created many applications about SQL database, BigSQLRunner is my example ([url removed, login to view]). I think with my experience. I'll be a suitable candidate for your project. I'm very please to w Mais

$20 USD in 10 dias
(0 Comentários)

We would make minor adjustments to your query in the project with a few converts etc. Already tested it here and it works like a charm!!

$25 USD em 1 dia
(0 Comentários)

Hi, I can help you resolve this issue in no time .I have 5 + years experience in [url removed, login to view] your still looking for the solution .Please let me know.I have the solution of your problem. Thanks, Saba

$25 USD in 3 dias
(0 Comentários)