Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)

  • RE: A "special" stored procedure problem

    TheSQLGuru (11/21/2013)


    I am sorry Luka, but I still have no idea what you need here. Your data doesn't match the graphic you gave (which covers 2010-03-26 06:00 through 2010-03-27...

  • RE: A "special" stored procedure problem

    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...

  • RE: A "special" stored procedure problem

    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...

  • RE: A "special" stored procedure problem

    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;

Viewing 4 posts - 1 through 4 (of 4 total)