i have set of data looks this:
for reporting purposes, have pivot interviewnotes column. here far i've gotten:
select candidateid, jobid, [1] int1, [2] int2, [3] int3 (select candidateid, jobid, interviewnotes, interviewno dbo.factinterview) sourcetable pivot ( max(interviewnotes) interviewno in ([1],[2],[3]) ) pivottable
for each column, i'd display: interviewname, interviewdt, interviewnotes concatenated. such as:
int1: interviewername - interviewdt - interviewnotes int2: interviewername - interviewdt - interviewnotes
if want interviewername
, interviewdt
, interviewnotes
concatenated displayed in final column, concatenate values before pivot:
select candidateid, jobid, [1] int1, [2] int2, [3] int3 ( select candidateid, jobid, interviewno, interviewnotes = interviewername + ' - '+ convert(varchar(10), interviewdt, 120) +' - '+ interviewnotes dbo.factinterview ) sourcetable pivot ( max(interviewnotes) interviewno in ([1],[2],[3]) ) pivottable
Comments
Post a Comment