Forum Replies Created

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

  • RE: Summarize data over contiguous date ranges

    I guess "condensing" is probably not the right term. I guess resolving overlapping dates while accurately summarizing the metrics (value1, value2) is probably a better description.

    The problem is I have...

  • RE: Dynamic SQL

    ColdCoffee,

    Your solution works except for the glitch you mentioned. Thanks for all your help. I came up with the solution I needed. Here's the code.

    -- Input

    CREATE TABLE #Lookup (

    ...

  • RE: Dynamic SQL

    Lynn,

    It doesn't have to be dynamic. I can't really post the exact question due to compliance issues. In my example, My Data table contains only A,B,C and D columns. But...

  • RE: Dynamic SQL

    Lynn,

    Sorry. I'm a rookie. Below is the complete question and code.

    CREATE TABLE Lookup (

    Key CHAR (2)

    ,Col1 CHAR(1)

    ,Col2 CHAR(1)

    ,Col3 CHAR(1)

    ,CONSTRAINT...

  • RE: Dynamic SQL

    Sorry about that. yes, I do have primary key on the DATA table.

    We can call it Id

    CREATE TABLE DATA (

    ID INT IDENTITY(1,1)

    KEY CHAR(2)

    ,A INT

    ,B INT

    ,C INT

    ,D INT

    )

    INSERT INTO DATA VALUES

    ('00',1,2,3,4),('01',5,6,7,8)

  • RE: Dynamic SQL

    Thanks for the prompt reply. The query you posted would work. But, the example I provided is really a short version of what I really need.

    In the actual problem, the...

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