MSSC_support
asked on
Displaying data from the same table value but in a different column
I am trying to write a report where a particular record can have more than one record associated with it on another table. The problem is I want to see it for that same record in a different column so that we can see it all as a bigger picture. I have tried to use aliases but I do not know how to get the data to appear inside those columns. Below is the main query but I also want to add the information for activity value description with a different activity 'STUD' to go along with 'FINSUP'
select c.label_name, c.status, a.activity_value_desc as Financial_Support_Type, a.activity_value_desc as student_status
FROM contacts C
INNER JOIN contact_categories cc ON cc.contact_number = c.contact_number
INNER JOIN activity_values A ON a.activity_value = cc.activity_value
WHERE cc.activity = 'FINSUP'
ORDER BY c.label_name
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi John,
The above failed to bring back any results. I may see what I can do with it to however.
Thanks,
Jayson
The above failed to bring back any results. I may see what I can do with it to however.
Thanks,
Jayson
ASKER
I managed to get it working using the segment of SQL provided.
ASKER