﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / T-SQL (SS2K5)  / Not generating run time / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 07:56:24 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Not generating run time</title><link>http://www.sqlservercentral.com/Forums/Topic1381141-338-1.aspx</link><description>Thanks Sean, I use the numeric data type so seldom I often forget about it. (I tend to use float or one of the int)</description><pubDate>Mon, 05 Nov 2012 10:11:01 GMT</pubDate><dc:creator>dwilliscp</dc:creator></item><item><title>RE: Not generating run time</title><link>http://www.sqlservercentral.com/Forums/Topic1381141-338-1.aspx</link><description>Oh, and I am also using @@rowcount to show the number of records. After this things will get a bit interesting.. since I will have to capture things that would cause the statement to take a lot longer to run. The program in question runs fine most of the month, but about three days a month it spikes and runs about four times as long. I am writing the @message, and the job name, into a table so I can capture the normal and spikes.. and I hope to find out why it spikes.</description><pubDate>Mon, 05 Nov 2012 10:08:04 GMT</pubDate><dc:creator>dwilliscp</dc:creator></item><item><title>RE: Not generating run time</title><link>http://www.sqlservercentral.com/Forums/Topic1381141-338-1.aspx</link><description>It is datetime..declare 	    @startdate              datetimeand I am using getdate() to load into @startdate, at the top of the program.So I would expect to see ... lets say the program took 28min , I would expect to see the following:time 0.25 time 0.40 time 1.50 time 6.33 time 9.75 time 13.12 time 25.05 time 26.80 time 28.0Note my code has a label before time, so I know what statement was last executed.</description><pubDate>Mon, 05 Nov 2012 10:03:06 GMT</pubDate><dc:creator>dwilliscp</dc:creator></item><item><title>RE: Not generating run time</title><link>http://www.sqlservercentral.com/Forums/Topic1381141-338-1.aspx</link><description>Hi,what is your @startdate datatype.Also can you give an example on what the parameters actual value are and what you want it to look like.ThanksSatyensorry didnt see the reply.good work!!!</description><pubDate>Mon, 05 Nov 2012 09:21:02 GMT</pubDate><dc:creator>menon.satyen</dc:creator></item><item><title>RE: Not generating run time</title><link>http://www.sqlservercentral.com/Forums/Topic1381141-338-1.aspx</link><description>[quote][b]dwilliscp (11/5/2012)[/b][hr]I have the SQL, listed below, what I would like to do is to get the fractions down to two places (0.25), but looking at the convert function it looks like the min is 6. Any ideas?set @message = 'time ' + cast((cast(datediff(ss,@startdate,getdate()) as int)/60) as varchar(12))[/quote]Like this?[code]select 'time ' + cast(cast(cast(datediff(ss,@startDate - 1,getdate()) as int)/60. as numeric(9,2)) as varchar(15))[/code]</description><pubDate>Mon, 05 Nov 2012 09:16:47 GMT</pubDate><dc:creator>Sean Lange</dc:creator></item><item><title>Not generating run time</title><link>http://www.sqlservercentral.com/Forums/Topic1381141-338-1.aspx</link><description>I have the SQL, listed below, what I would like to do is to get the fractions down to two places (0.25), but looking at the convert function it looks like the min is 6. Any ideas?set @message = 'time ' + cast((cast(datediff(ss,@startdate,getdate()) as int)/60) as varchar(12))</description><pubDate>Mon, 05 Nov 2012 09:04:41 GMT</pubDate><dc:creator>dwilliscp</dc:creator></item></channel></rss>