在 SQL Server 中捕获 SSRS 报表中"Messages"的打印语句



我有一个sql server sp(它在sql server 2000、2005、2008、2012上运行),它使用打印语句作为"消息"而不是"结果"返回html代码

html代码用于构建html网页,由于返回的字符长度,我无法使用select语句。

我需要在SSRS报告中捕获打印语句"Messages"来构建网页。如果不可能,有没有办法在SQL server中捕获它并将"消息"插入临时表中?

您可以尝试以下操作:(在过程结束时)

create table #msgs (line1 varchar(2000))
insert into #msgs 
select 'This is a very long msg'+col1 from table25
select line1 from #msgs

最新更新