Convert rows to columns

  • I have a table with two columns

    User NameGroup Membership

    aagarwai3.gt.qc

    aagarwai3.India.Gurgaon

    aagarwaQTP_CSA

    aagarwaQuest_i3_to_MS

    how would I get the following result set?

    I want the result set to be like this (Ignore the column names)

    aagarwai3.gt.qci3.India.Gurgaon QTP_CSA Quest_i3_to_MS

  • In your case it's very simple:

    SELECT 'aagarwa', 'i3.gt.qc', 'i3.India.Gurgaon', 'QTP_CSA Quest_i3_to_MS'

    If you need more relevant answer, please use the link in my signature. You will find some information there which will help you to represent your question in a way which will attract prompt and helpfull advises.

    Also for your particular case, what the maximum number of columns you expect in resultset?

    Will it be fixed or variable?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

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

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