User Profile

Collapse

Profile Sidebar

Collapse
sdurant
sdurant
Last Activity: Nov 29 '10, 10:18 PM
Joined: Feb 10 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sdurant
    replied to need help with CASE function
    Thanks for the tip, it's exactly what I need. Sadly, I'm not a sysadmin so I can't set the compatibility level to make the PIVOT function work. I guess it's just lip service when Microsoft says it wants to push access down to the "knowledge worker".

    Anyway, thanks for your help!
    See more | Go to post

    Leave a comment:


  • sdurant
    replied to need help with CASE function
    No error, it just doesn't return the result I want. See example.
    See more | Go to post

    Leave a comment:


  • sdurant
    started a topic need help with CASE function

    need help with CASE function

    I have a table
    Student Subject Score
    Sally Math 98
    Sally Reading 96
    Billy Science 72
    Billy Reading 63

    I want a result
    Student MathScore ReadingScore
    Sally 98 96
    Billy null 63

    My SQL
    Select student,
    case when subject=Math then Score else null end as MathScore,
    case when subject=Reading...
    See more | Go to post
No activity results to display
Show More
Working...