Need move to Column value to Row value for Testing Purpose

  • Hi

    i want move column to in one level down so i can copy the column name and paste it into excel for testing purpose. i can do it manullay but my table contai more then 100 column.

    my table is look like

    custID custName CusAddres

    1 uuu BBB

    2 yhy ujj

    3 ksj mks

    4 jksd sdf

    now i want below result set

    col1 col2 col3

    custID custName CusAddres

    1 uuu BBB

    2 yhy ujj

    3 ksj mks

    4 jksd sdf

    so i can just copy the all column name for 1st rows and put it excel.

    Thank you in Advance.

  • In SSMS, there is an option to include column headers when you copy results or output them to text. It's under

    Tools --> Options --> Query Results --> SQL Server --> Results to Grid and

    Tools --> Options --> Query Results --> SQL Server --> Retulst to Text

  • right click on the results pane in SSMS

    "copy with headers"

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • i got it.

    Thank you very much.

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

You must be logged in to reply to this topic. Login to reply