I am sorry if this is duplicate. Please point me to correct question. I am using SQL SERVER 2008. I am using below query since I need to get data from 3 tables.
SELECT qc.FileID as [FileID],
qc.QID1 as [QID1],
xqs.SID1 as [SID1],
xqc.CID1 as [CID1],
xqs.Comments as [SComments],
xqc.Comments as [CComments]
FROM QCTable(nolock) qc
JOIN QCSectionTable (nolock) xqs ON qc.QCID = xqs.QCID
LEFT JOIN QCChargeTable (nolock) xqc ON xqc.QCXrefID = xqs.QCXrefID
For above I am getting this like FieID1 SID1 SID1 CID1 SComments CComments
I have a row like below
FileID1 QID1 SID1 CID1 SComments CComments
I need to split above row as
FileID1 QID1 SID1 null SComments
FileID1 QID1 SID1 CID1 CComments
Thanks in advance.