【发布时间】:2017-09-29 13:15:00
【问题描述】:
在我的查询中,我有一个字段 Keywords,其中包含一个用分号分隔的值列表 ;
在我的 SSRS 报告中,我的参数之一 @Keywords 包含该 Keywords 字段中所有可能的单个值的列表。
如何将多值参数
@Keywords传递给我的查询并检查字段Keywords是否包含任何选定的参数值?
我有一个拆分函数,可以将@Keywords 和Keywords 分隔成它们各自的关键字项,但是如何在我的 Where 语句中执行此检查?
Keywords 示例
corporate finance; compensation; financial markets
@Keywords 示例Accounting,Accounting and Financial Reporting,Agriculture,airlines,corporate finance,compensation,Offshore drilling,Pharmaceuticals,portfolio,anagement
在这些示例中,@Keywords 包含 corporate finance 和 compensation,因此我的报告将显示与示例 Keywords 字段关联的记录。
只要@Keywords 包含Keywords 中的任何值,我们就需要该记录。
【问题讨论】:
标签: tsql reporting-services compare contains exists