Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SQLCM
Starting Member
13 Posts |
Posted - 2007-06-06 : 01:02:57
|
| Thought I might get more respnose on this board.This is the result I got from running a simple select query:employee_ID last_name test_date test_score34 Taylor 02/05/2006 8585 Lomeli 03/15/2006 7285 Lomeli 03/25/2006 78110 smith 03/17/2006 90110 smith 03/24/2006 89110 smith 05/05/2006 92How do I go from this format to the format below?I would like the result to look like:employee_ID last_name test_score_1 test_score_234 Taylor 85 85 Lomeli 72 78110 Smith 90 89Instead of having multiple rows for each employee, I would like to have one row for each empolyee and display top 2 test_scores in a single row. Thanks for your expertise in advance. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|