Viewing 4 posts - 1 through 4 (of 4 total)
TheSQLGuru (11/21/2013)
November 22, 2013 at 2:07 am
The corresponding Oracle solution of my problem.
There are actually 2 functions; one doing the number HOUR (==@step) and the other GetIntervalDuration do the select and calculates the DELAY :w00t:
CREATE...
November 21, 2013 at 10:34 am
This is my table
CREATE TABLE [dbo].[DLY_DELAY] (
[DELAY_CNT] [dbo].[LongInt] NOT NULL,
[START_DELAY] [dbo].[DTimeNull] NULL,
[END_DELAY] [dbo].[DTimeNull] NULL)
Some data...
insert into [dbo].[DLY_DELAY]([DELAY_CNT],[START_DELAY],[END_DELAY]) values (0,'2013-06-15 13:25:02','2013-09-24 14:57:26');
insert into [dbo].[DLY_DELAY]([DELAY_CNT],[START_DELAY],[END_DELAY]) values (1,'2013-06-15 13:25:02','2013-06-16 13:25:03');
insert into [dbo].[DLY_DELAY]([DELAY_CNT],[START_DELAY],[END_DELAY]) values...
November 21, 2013 at 1:00 am
So far I implemented this:
CREATE PROCEDURE myStoProc(@start datetime, @stop datetime, @step int)
AS
SELECT *
FROM DLY_DELAY
WHERE START_DELAY>=@start AND END_DELAY<=@stop;
November 20, 2013 at 7:12 am
Viewing 4 posts - 1 through 4 (of 4 total)