psathish2 -6 Junior Poster in Training

hi Viewer ,

i was designed reports while there display the shift record column to row , there is multiple there is multiple record i want display one record into column to Row using sqlserver ..
i have query in column to row i donot how to apply in view in sqlserver

this My View

SELECT DISTINCT JC.[JC No] ,D.[Drawing Name],P.[Pattern No],G.[Grade Name] , CMP.[Component Name] ,C.[Core Name] ,US.[User Name],
[dbo].ReportCoreShift(CL.Shift)as Shift1,S.Shift AS ShiftCon,
CLD.[Produced Qty] ,CLD.[Core Wt],CLD.Remarks,CL.[Core Log Date] ,CLD.[JC NO]AS JCPKID,CL.Shift,
CL.PKID as [CoreLog PKid] ,CLD.[Core ID] ,CD.PKId as PartnameID FROM TblCoreLog CL
JOIN TblCoreLogDetails CLD ON CLD.[Core Log PKID] =CL.PKID
JOIN TblDrawing D ON D.PKId =CLD.[Drawing No] AND D.IsDeleted =0 and CL.IsDeleted =0
JOIN TblPattern P ON P.PKID =CLD.[Pattern No] AND P.IsDeleted =0

this query Column to row

DECLARE @Names VARCHAR(8000)
SELECT @Names = COALESCE(@Names + ', ', '') + [Shift] FROM TblShift where [Shift] is not null
SELECT @Names

how can the row to column query using view program...