Home Forums Programming XML FOR XML PATH , for NULL column values RE: FOR XML PATH , for NULL column values
sankyverma38
Old Hand
Points: 350
More actions
May 28, 2010 at 12:20 pm
#1174091
This can be done be using ISNULL() check.
SELECT
ISNULL(column_name1,'') AS "ColumnName1",
ISNULL(column_name2,'') AS "ColumnName2"
ISNULL(column_name3,'') AS "ColumnName3"
FROM table FOR XML PATH('Table'), ELEMENTS