SSRS-Report - 如何从参数中获取 table 名称
SSRS-Report -How to get table name from parameters
我正在尝试从参数中获取 table 名称,然后我会将其用于我的查询,例如
declare @cmd nvarchar(100)
declare @tableName nvarchar(100)
select @cmd = ' select * from ' + @tableName
execute (@cmd)
当我尝试 运行 使用查询设计器数据集时,它会弹出类似
的错误消息
the declare sql construct or statement is not supported
我错过了什么需要存在的东西或者是什么导致了这个问题?
希望有人能帮忙解决一下
谢谢
只是查询设计器出于显而易见的原因无法支持这一点。只需点击查询设计器左上角的“编辑为文本”,然后您就可以随心所欲了。
请记住,您的数据集必须始终return具有相同数据类型的相同顺序的相同列名。
我正在尝试从参数中获取 table 名称,然后我会将其用于我的查询,例如
declare @cmd nvarchar(100)
declare @tableName nvarchar(100)
select @cmd = ' select * from ' + @tableName
execute (@cmd)
当我尝试 运行 使用查询设计器数据集时,它会弹出类似
的错误消息the declare sql construct or statement is not supported
我错过了什么需要存在的东西或者是什么导致了这个问题? 希望有人能帮忙解决一下
谢谢
只是查询设计器出于显而易见的原因无法支持这一点。只需点击查询设计器左上角的“编辑为文本”,然后您就可以随心所欲了。
请记住,您的数据集必须始终return具有相同数据类型的相同顺序的相同列名。