Well, I'm not sure how easily this can be done so seek help from the collective wisdom.I have a query that outputs phone contact info. Each resulting row may have the same person but the phone type and number is different on each row. I need to be able to run a query that will have the resulting output in a single row with each row having the name and different phone types ( home, work, cell) as column headings. I was wondering what SQL functions might help me attain this part. Here is the query.
SELECT cn.Sno,Student.SID, Student.LName, Student.FName, Student.Grade, substring(cn.ContactName,1
,22) as Contact, cn.StudentRelation as Relation, cn.PhoneTitle, cn.Number
FROM Student join StudentContactNumbers cn on cn.sno=Student.sno join StudentHomeInfo hi on hi.sno = Student.snojoin Household h on h.hhid = hi.hhid
where Student.Status = 'A' and cn.StudentRelation <>'self' and student.SNO=1920
ORDER by Student.Grade, Student.Lname
The output from above and what I need it to look like are in the attachment.