Groups | Blog | Home
all groups > sql server data mining > december 2004 >

sql server data mining : Half Hour Time Intervals


Kent Prokopy
12/28/2004 7:41:01 AM
I have a table that stores three fields of information.
(AgentID Int, Orig DateTime, Term DateTime)

Example:
AgentID = 1, Orig = '12/27/2004 9:00:00 AM', Term = 4:59:59 PM

I would like a t-sql that will display this data in half hour intervals for
me.

Example:
AgentID = 1, Orig_Interval = '12/27/2004 9:00:00 AM', Duration = 1800
AgentID = 1, Orig_Interval = '12/27/2004 9:30:00 AM', Duration = 1800
""
""
Last record would be like:
AgentID = 1, Orig_Interval = '12/27/2004 4:59:59', Duration = 1799
Adam Machanic
12/28/2004 11:09:05 AM
You don't like the solution I posted two weeks ago?

--
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--


[quoted text, click to view]

AddThis Social Bookmark Button