In this blog post, we’ll explore a method for stripping these HTML tags from your text data using SQL Server. Let us explore the post.
Alternate Row Colors in an HTML Table Using T-SQL
To get alternate row colors in an HTML table from T-SQL, number the rows with ROW_NUMBER and pick a color by odd or even. This post builds the whole table with STRING_AGG, escapes special characters, colors one cell by value, and explains why the numbering must follow the display order.
Sending an HTML Table by Email With sp_send_dbmail
Turn a wall of report text into a clean table. FOR XML PATH escapes your data, and a few small tricks handle NULL values and empty days.



