Sql Column value dyncamically

  • Hi

    I have data like below . I want display like this . Is it possible thru query

    209     100        Sudhir kumar Gupta       30 days         Davinder singh        1 Day            Karan Negi       10 days.

    No         Total Days           Level1                             Days       Level 2                   Days              Level 3                 Days

    209       100                        Sudhir Kumar Gupta  30 Days Davinder Singh - 1 Day              Karan Negi        10 Days

    Thanks

  • I see no difference between the original data form and what you've requested. other than some column names in the desired output.  We don't actually know what the column names in the input should be.

    I strongly recommend that you read and heed the article at the first link in my signature line below for how to post code problems.  Help the folks that you're asking the question of so they can help you.

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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