Forum Replies Created

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

  • RE: Roll up of a column in dynamic query

    have got the desired result.. Thank you very much

  • RE: Roll up of a column in dynamic query

    Thank you very much for your help... but I cant create a table with the columns D1, D2 etc like..

    CREATE TABLE #Temp1

    (

    clientid int,

    tagid int,

    tname varchar(max),

    d1 int,

    d2 int,

    d3 int,

    d4 int,

    d5...

  • RE: Roll up of a column in dynamic query

    Now I have to get the row sum of each column from D1 to D4.

    Example: the desired result set would be like the below

    Cid TagId Name D1 D2 D3 D4...

  • RE: Roll up of a column in dynamic query

    Yeah Roll up works here. I have already tried.. but it is not working in inner query. So I have taken another outer select query and got the desired result.....

  • RE: convert NULL to 0 in Pivot Result Set

    I want the rollup of D1, D2 etc for each name.

    Example: If the result set like the below..

    Clientid TagId Name D1 D2 D3 D4 D5

    1 47 American 1000 500 300 0 0

    1 48 Hispanic 0 0 0 1000 200

    1 47 American 1000 500 300 0 0

    1 48 Hispanic 0 0 0 1000 200

    I want the result set like the following..

    Clientid TagId Name D1 D2 D3 D4 D5

    1 47 American 1000 500 300 0 0

    1 47 American 1000 500 300 0 0

    1 47 ...

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