From: Joe on
Hello Folks,

Just looking for an "easy" to take the outputs of a sql server to HTML.

TIA,
From: Jay on
From T-SQL?

You can output to XML.

"Joe" <Joe(a)discussions.microsoft.com> wrote in message
news:0FB34C5C-2B62-4296-BB05-BD4D7613E2AD(a)microsoft.com...
> Hello Folks,
>
> Just looking for an "easy" to take the outputs of a sql server to HTML.
>
> TIA,


From: Tony Rogerson on
Something like
(http://sqlblogcasts.com/blogs/tonyrogerson/archive/2008/10/24/format-query-output-into-an-html-table-the-easy-way.aspx)...

declare @body varchar(max)



-- Create the body

set @body = cast( (

select td = dbtable + '</td><td>' + cast( entities as varchar(30) ) +
'</td><td>' + cast( rows as varchar(30) )

from (

select dbtable = object_name( object_id ),

entities = count( distinct name ),

rows = count( * )

from sys.columns

group by object_name( object_id )

) as d

for xml path( 'tr' ), type ) as varchar(max) )



set @body = '<table cellpadding="2" cellspacing="2" border="1">'

+ '<tr><th>Database Table</th><th>Entity Count</th><th>Total
Rows</th></tr>'

+ replace( replace( @body, '&lt;', '<' ), '&gt;', '>' )

+ '<table>'





print @body


"Joe" <Joe(a)discussions.microsoft.com> wrote in message
news:0FB34C5C-2B62-4296-BB05-BD4D7613E2AD(a)microsoft.com...
> Hello Folks,
>
> Just looking for an "easy" to take the outputs of a sql server to HTML.
>
> TIA,

From: William Vaughn (MVP) on
Reporting Services? Report Builder, ReportViewer?

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
____________________________________________________________________________________________



"Joe" <Joe(a)discussions.microsoft.com> wrote in message
news:0FB34C5C-2B62-4296-BB05-BD4D7613E2AD(a)microsoft.com...
> Hello Folks,
>
> Just looking for an "easy" to take the outputs of a sql server to HTML.
>
> TIA,

From: Jay on
> Reporting Services? Report Builder, ReportViewer?

DOH!

>
> --
> __________________________________________________________________________
> William R. Vaughn
> President and Founder Beta V Corporation
> Author, Mentor, Dad, Grandpa
> Microsoft MVP
> (425) 556-9205 (Pacific time)
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> http://betav.com http://betav.com/blog/billva
> ____________________________________________________________________________________________
>
>
>
> "Joe" <Joe(a)discussions.microsoft.com> wrote in message
> news:0FB34C5C-2B62-4296-BB05-BD4D7613E2AD(a)microsoft.com...
>> Hello Folks,
>>
>> Just looking for an "easy" to take the outputs of a sql server to HTML.
>>
>> TIA,
>