Create HTML Table with SQL FOR XML

前端 未结 8 1423
夕颜
夕颜 2020-11-22 08:34

I\'m creating a HL7 Continuity of Care Document (CCD) using FOR XML statements in SQL Server 2008 R2.

I\'ve done A LOT with this method, but this is the first time I

8条回答
  •  温柔的废话
    2020-11-22 08:53

    I ran into this problem awhile ago. Here is how I solved it:

    SELECT
    p.ProblemType AS "td"
    , '' AS "text()"
    , p.Onset AS "td"
    , '' AS "text()"
    , p.DiagnosisStatus AS "td"
    
    FROM tblProblemList p
    WHERE p.PatientUnitNumber = @PatientUnitNumber
    FOR XML PATH('tr')
    

提交回复
热议问题