pivoting

  • please check this out:

    my data is like as folows

    order_num prdo_grp level

    10001 [lux][santoor] 1

    10002 [grp][app] 2

    20003 [htc][hutch] 3

    result should be like as follows[ contains only one record]

    order_num submission order1 order2 order3

    10001 [lux][santoor] [grp][app] [htc][hutch] null

    everytime it should take the order number as level1 order number.

  • Hi there,

    Uhmmm... where do you need the PIVOT?

    why not just use TOP?

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • Actually Im not that familiar with PIVOT...

    but, I think someone already answered your question in your other post...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • Duplicate post, see http://www.sqlservercentral.com/Forums/Topic559341-338-1.aspx

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

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

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