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 |
|
Pereayel
Starting Member
6 Posts |
Posted - 2006-05-10 : 12:07:50
|
| Hi all,I'm new to this forumn and need your help. Below is the query that I am running and under it is the resulting table.SELECT DISTINCT school.schoolID, field.[name], degree. [name] AS degree, degree.degreeID, field.fieldIDFROM school_field INNER JOIN school_field_degree ON school_field.schoolID = school_field_degree.schoolID AND school_field.fieldID = school_field_degree.fieldID INNER JOIN school ON school_field.schoolID = school.schoolID INNER JOIN degree ON school_field_degree.degreeID = degree.degreeID INNER JOIN field ON school_field.fieldID = field.fieldIDWHERE school.schoolID = 136 AND school.siteID = 7ORDER by school.schoolID---------------------------------------------------------result----------------------------------------------------------136 Early Childhood Education Bachelors 2 48136 Education Bachelors 2 51136 Education Masters 3 51136 Elementary Education Bachelors 2 52----------------------------------------------------------Myquestion is how can I format the result to look like the one below? Thanks136 Early Childhood Education Bachelors 136 Education Bachelors Masters 136 Elementary Education Bachelors |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2006-05-10 : 12:45:37
|
Hi Pereayel,See this link for advice how to explain your problem so you can get answers quick:http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxIt would be great if you could post 2 and 3 - as well as the 1, 4 and 5 you've already posted Ryan Randallwww.monsoonmalabar.com London-based IT consultancy Solutions are easy. Understanding the problem, now, that's the hard part. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|