GlobalTable_To_HtmlTable
Constructs an HTML Table from tabular data in a global temporary table
- Free Stored Procedure
- SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017
EXEC SQLHTTP.net.GlobalTable_To_HtmlTable @GlobalTableName, @HtmlTable OUTPUT
Name | Type | Description |
---|---|---|
@GlobalTableName | varchar(100) | Name of a Global Temporary Table that has been created and populated with data |
@HtmlTable | xml | Output parameter. nvarchar(MAX) |
See the @HtmlTable output parameter
This example demonstrates copying the content of a view (OLEDBProviders) into a global temporary table which is then used to construct an HTML Table:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
SET NOCOUNT ON DECLARE @GlobalTableName varchar(100) DECLARE @HtmlTable xml SELECT * INTO ##Temp FROM SQLHTTP.net.OLEDBProviders SET @GlobalTableName = '##Temp' EXEC SQLHTTP.net.GlobalTable_To_HtmlTable @GlobalTableName, @HtmlTable OUTPUT SELECT @HtmlTable |
1 2 3 4 |
--------------------------------------------------------------------------------- <table><tr><th>Provider</th><th>ProgID</th><th>Is32Bit</th></tr><tr><td>... |