UDF with Table-Valued Param; Output HTML string using XML
First-time poster here. I sincerely value the contributions many of you have made to this forum over the years. I have learned a lot. I am thinking of a function for future use that I would like to create but don't know if it's possible (first of all), and even if it was, am not sure exactly how to get started with this one. I want a function generic enough that it could be used by various reporting jobs to create an output HTML table (VARCHAR(MAX)) for DBmail jobs to run daily/weekly exception reports. This function would need to accept a table-valued parameter and output the table as an HTML string, presumably using XML syntax, though I would use any syntax that would work. Is this function possible on SS2008-R2? Thank you.