none
how to show rows as in columns with a space in between please

    Question

  • Hello

    how to show rows as in columns

    create table table1(col1 numeric, col2 numeric)

    insert into table1 Values (4336,    40)
    insert into table1 Values (4336,    07)
    insert into table1 Values (4336,    18)
    insert into table1 Values (4336,    12)
    insert into table1 Values (4336,    13)
    insert into table1 Values (4338,    07)
    insert into table1 Values (4338,    12)
    insert into table1 Values (4338,    13)
    insert into table1 Values (4339,    40)
    insert into table1 Values (4339,    29)
    insert into table1 Values (4339,    07)
    insert into table1 Values (4339,    12)
    insert into table1 Values (4339,    13)
    insert into table1 Values (4340,    03)
    insert into table1 Values (4340,    12)
    insert into table1 Values (4340,    07)
    insert into table1 Values (4341,    03)
    insert into table1 Values (4341,    21)
    insert into table1 Values (4342,    07)
    insert into table1 Values (4342,    29)
    insert into table1 Values (4344,    07)
    insert into table1 Values (4344,    54)
    insert into table1 Values (4345,    03)
    insert into table1 Values (4345,    12)
    insert into table1 Values (4345,    13)


    create table table2(col1 numeric, name varchar(20))
    \


    select * from table1
    select * from table2

    expected results

    please help me

    thanks in advance

    milan



























    • Edited by Milano85 Saturday, June 29, 2013 5:19 PM
    Saturday, June 29, 2013 4:38 PM

Answers

  • I am sure the below would help you...

    http://beyondrelational.com/modules/24/syndicated/509/posts/12832/tsql-script-generatingconcatenating-values-into-a-comma-separated-string-with-a-grouping.aspx


    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Saturday, June 29, 2013 4:51 PM

All replies

  • I am sure the below would help you...

    http://beyondrelational.com/modules/24/syndicated/509/posts/12832/tsql-script-generatingconcatenating-values-into-a-comma-separated-string-with-a-grouping.aspx


    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Saturday, June 29, 2013 4:51 PM
  • Thank you so much

    it worked me

    thanks alot

    milan

    Saturday, June 29, 2013 5:19 PM