This is a follow-up question after a comment left on my last question/answer.
I have this code a HTML table but the first column has no name, which means the headings don't line up properly. This is because I'm using this syntax to identify even/odd rows - cast((select ROW_NUMBER() over(order by id) % 2 as 'td',
How can I set the heading for the first column?
set @tableHTML = '<html><head><style>' +
'td {border: solid black 1px;padding-left:5px;padding-right:5px;padding-top:1px;padding-bottom:1px;font-size:11pt;} ' +
'</style></head><body>'
+ '<div style="margin-top:20px; margin-left:5px; margin-bottom:15px; font-weight:bold; font-size:1.3em; font-family:tahoma;">' +
@textTitle + '</div>'
+ '<div style="margin-left:50px; font-family:tahoma;"><table cellpadding=0 cellspacing=0 border=0>' +
'<tr bgcolor=#4b6c9e>'
+ '<td align=center><font face="calibri" color=White><b>Col1</b></font></td>'
+ '<td align=center><font face="calibri" color=White><b>Col2</b></font></td>'
+ '<td align=center><font face="calibri" color=White><b>Col3</b></font></td>'
+ '<td align=center><font face="calibri" color=White><b>Col4</b></font></td>'
+ '<td align=center><font face="calibri" color=White><b>Col5</b></font></td>'
+
'</tr>'
select @body =
cast((select ROW_NUMBER() over(order by id) % 2 as 'td',
'',
isnull(col1,'') as 'td',
'',
isnull(col2,'') as 'td',
'',
isnull(col3,'') as 'td',
'',
isnull(col4,'') as 'td',
'',
isnull(col5,'') as 'td'
from @tableUpdate
where notificationType = 'NEWDATE'
order by clname
for XML path('tr'), elements) as nvarchar(max))
select @tableHTML = @tableHTML + @body
+ '</table></div></body></html>'