Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Exclamation Unanswered: Challenge : Vertical view to Horizontal in a StorProc

    From:
    Cust | Qstion | Answer
    _________________________________
    1,1,Bike
    1,4,Blue
    1,6,No ensurance
    2,1,Car
    2,3,silver
    2,9,ensurance
    2,11,Yes


    To the following
    Cust______1______3______4______6______9______11
    __________________________________________________ __________
    1_______Bike___________Blue__No ENsur_________
    2_______car____silver_________________Ens____Yes"
    Last edited by Marvels; 07-09-04 at 09:19. Reason: Title

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    That's no challenge, it is a pivot.

    -PatP

  3. #3
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Exclamation Not A Pivot

    Quote Originally Posted by Pat Phelan
    That's no challenge, it is a pivot.

    -PatP

    Its not a pivot because a pivot will have a count or a sum function in it this dosn't

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by Marvels
    Its not a pivot because a pivot will have a count or a sum function in it
    Why? I pivot data all the time, and only aggregate it about 20% of the time. Usually I just want the rows presented as columns and vice versa... I don't care about aggregation.

    -PatP

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You can fake-out the aggregation by using MAX([Answer]). Since there is only one answer for each Cust and Question, that is what you will get.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Talking Thanks a bundel

    So obvius that i overlooked it compleetly


    Thanks again
    Hope the stress level will drop as quiick as it raise

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •