Forum Replies Created

Viewing 6 posts - 1 through 7 (of 7 total)

  • RE: looping through dates in a table

    Ok I am having a look at it now, I will definitely need to apply similar logic in the future, so best I brush up now.

    Feel free to update the...

  • RE: looping through dates in a table

    holy crap!! Obi-Wan has taught you well!!

    Thanks a million Jared I thought I wouldn't be able to solve this!

    You are my new personal SQL Jesus lol or what ever flavor...

  • RE: looping through dates in a table

    Hi Jared

    Yes I have tried my @$$ off lol

    Basically, I know you can compare a table to itself using a self join, and I know you can use the datediff...

  • RE: looping through dates in a table

    Hi Jared

    Ah, the reason for that is, I didn't want to give you irrelevant information.

    I don't really care about the other columns. The only result I really want to see...

  • RE: looping through dates in a table

    CREATE TABLE [dbo].[SAMPLE_TEST](

    [ref] [nvarchar](60) NULL,

    [SAMPLE_ID] [int] NOT NULL,

    [SAMPLE_DATE] [datetime] NOT NULL,

    [template_descr] [nvarchar](512) NULL,

    [template_id] [int] NOT NULL,

    [STARTING_DATE] [datetime] NOT NULL,

    [FREQ_UNIT] [int] NULL,

    [FREQ_VALUE] [int] NULL

    ) ON [PRIMARY]

    GO

  • RE: looping through dates in a table

    Hi Jared

    Thanks for the quick reply.

    I want to group by ref (description of the plant) , and by template_descr (there are actually different monitoring processes).

    So each sample is basically taken...

Viewing 6 posts - 1 through 7 (of 7 total)