Want to append to different values to a output

  • HI,

    I am using a store procedure to return value.

    ID Name Role Date

    8 palaneeswar_c All Approvers 2010-11-18 23:02:43.990

    13 Deepak_Agarwal109 All Approvers 2010-11-18 23:02:38.447

    Finally i want to create a result set as this based upon the roles.

    TL1 palaneeswar_c Date 2010-11-18 23:02:43.990

    TL2 Deepak_Agarwal109 Date 2010-11-18 23:02:38.447

    TL1 in case of All Approvers or HR TL

    TL2 in case of All Approvers or Management TL.

    Please guide me as how can i achieve this..

  • Please remember: we don't know your table structure nor your business case. All we know is what you posted.

    And based on that, I don't think we can really help you.

    You might need a CASE WHEN THEN logic.

    But that's just guessing.

    Please see the first link in my signature on how to post questions.

    This will most definitely help us help you.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • And please post what you've actually tried.

    --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 3 posts - 1 through 2 (of 2 total)

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