Microsoft
Software
Hardware
Network
Question : T-SQL output to html
I would like to create a string from a simple select clause building an html table with the database rows...
I tried something like this but it didn't add multiple rows:
DECLARE @strHTML varchar(5000)
SET @strHTML = '
'
SELECT '
'+NavPass+'
<
td>'+email
+'r>' as strH FROM tblUser
SET @strHTML = @strHTML + '
'
can someone figure out how to have the return dataset encapsulated in an HTML table?
Answer : T-SQL output to html
DECLARE @strHTML varchar(5000)
SET @strHTML = '
'
SELECT @strHTML + CAST ( ( SELECT
td = NavPass, '',
td = email, ''
FROM tblUser
FOR XML PATH('tr'), TYPE
) AS Varchar(MAX) )+
N'
'
Random Solutions
Need Help Converting VB Script/WMI code into VB.NET Code (Remote Process Kill)
Is there a MAC equivalent for Windows Remote Desktop
TOP Percentage puzzle with SQL
Spin with "autobuddy" and "set buddy integer" strange behavour
need a nic driver for an HP Pavillion - went from Vista to XP-PRO
Wake on lan from Server 2008 64 bit
Can't solve mswrd632.wpc issue
Relate tables with no exact matching field
How to reverse engineer access adp sql server combination
Using "or" to search multiple criteria in a query by form ms access