Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL to HTML

Author  Topic 

ranalk
Starting Member

49 Posts

Posted - 2010-04-25 : 04:21:02
Hi,

I'm having a problem with text length (cut) on exporting for sql to html.
The table is :

The output HTML format of the row is (can't fit more than 30charaters):


And I'm exporting it to HTML using the following code:
SET @tableHTML =
N'<H1>' + @Subject + '</H1>' +
N'<table width="100%" border="2" cellspacing="0" cellpadding="0">' +
N'<tr style="border: 3px double blue" align=center><th>Local Errors</th></tr>'+
N'<tr style="border: 3px double blue" align=left ><th>Subject</th><th>API_Live</th><th>Live</th></tr>' +
CAST ( ( SELECT CONVERT(VARCHAR,SUBJECT) AS td ,CONVERT(VARCHAR,api_live) AS Td ,CONVERT(VARCHAR,live) AS tD
from #temp5 FOR XML PATH('tr'), TYPE
) AS NVARCHAR(MAX) )
+ '</table>'
SELECT @tableHTML

I would like to fit more than 30 characters on each cell, someone ?

Thanks!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-25 : 05:02:26
where are you outputing this which causes this retriction?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

ranalk
Starting Member

49 Posts

Posted - 2010-04-25 : 05:49:02
The HTML code that is being generate include this retriction.
e.g.
<tr><td>GetAllAgentsByParentAgent(INVA</td><Td>0</Td><tD>52</tD></tr>
Go to Top of Page

ranalk
Starting Member

49 Posts

Posted - 2010-04-26 : 02:18:23
Anyone can help ?
Go to Top of Page
   

- Advertisement -