SSRS 2008 传递多个参数 Oracle 10g 后端
使用 Cognos 几年后,我们正在测试 Cognos Reports (8.3) 到 SSRS 2008 报告的转换。我们使用 Oracle 数据库版本 10g。在我们正在转换的许多报告中,我们在参数中传递多个值,但是我无法在指向 Oracle 数据源的 SSRS 中使其正常工作。
我已经创建了参数并将其设置为允许多个值。这些列是整数类型。 SQL 过滤器设置如下,例如,其中vendor_id IN (:Vendor_id)。但是当我测试 SQL 时,我收到错误。我输入以逗号分隔的参数值,例如 102, 105, 107。错误如下。
ORA-01722:无效数字
我尝试将值用单引号、双引号括起来,但结果相同。是否有不同的格式来满足oracle语法要求?多个值仅适用于 SQL Server 数据库吗?
提前致谢。 乔
after several years of using Cognos, we are in process of testing conversion of Cognos Reports (8.3) to SSRS 2008 reports. we use Oracle database version 10g. in many of our reports we are converting we pass multiple values in parameters, however i cannot get this working in SSRS pointing to the Oracle datasource.
i have created parameter and set it to allow multiple values. these columns are integer types. the SQL filter is set as follows for example, where vendor_id IN (:Vendor_id). yet when I test the SQL, i get errors. i enter parameter values as comma-seperated for example, 102, 105, 107. errors as follows.
ORA-01722: invalid number
i've tried wrapping value in single, double quotes with same result. is there a different format to meet oracle syntax requirement? does multiple values only work for SQL server databases?
thanks in advance.
joe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如本文中所指出的,多值参数按如下方式连接和使用:
Select * from Table WHERE column1 in (:CommaSeparatedListOfValues)
http://consultingblogs.emc.com/stevewright/archive/2009/08/14/14763.aspx
因此 Vendor_id 必须为 Varchar2。我猜你的 Vendor_id 数据类型是整数?
As pointed out in this post, multi value parameters are concatenated and used as follows:
Select * from Table WHERE column1 in (:CommaSeparatedListOfValues)
http://consultingblogs.emc.com/stevewright/archive/2009/08/14/14763.aspx
So Vendor_id has to be Varchar2. I guess you have the data type of Vendor_id as integer?.