How to display Column Names v/s Column Values

  • I want to write a table value function That would return Columns v/s Values as

    select * from dbo.getColumnNameAndValues(RowID);

    The Result set is well described in attached image.

    Any help Please. I am badly stuck in my task.

    Thanks

  • Good afternoon!

    It seems that your DDL script, which I'm sure you provided after visiting SSC more than 200 times, has somehow become detached and in its place is a downloadable png!

    Don't worry, although very few will download your .png to discover your requirements, I'm sure you can help. There is a very useful article here[/url] that contains all you need to know about how best to post DDL with sample data and expected results.


    Forever trying to learn
    My blog - http://www.cadavre.co.uk/
    For better, quicker answers on T-SQL questions, click on the following...http://www.sqlservercentral.com/articles/Best+Practices/61537/
    For better, quicker answers on SQL Server performance related questions, click on the following...http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Cadavre (9/20/2011)


    Good afternoon!

    It seems that your DDL script, which I'm sure you provided after visiting SSC more than 200 times, has somehow become detached and in its place is a downloadable png!

    Don't worry, although very few will download your .png to discover your requirements, I'm sure you can help. There is a very useful article here[/url] that contains all you need to know about how best to post DDL with sample data and expected results.

    exaclty right, how can people put so little effort into asking a question and expect people to do all the work for them in answering it..

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

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