首页 > 解决方案 > 使用雪花数据源在 SSRS 上传递数据参数

问题描述

snowflake用作ssrs报告的数据源。我试图通过将我的查询添加为 expr 来传递参数。

这是我到目前为止所尝试的:

="select * from "Snowflake"."Past"."Customer"
where cast("startdate" as date)  = '" Parameters!mydate.Value"';"

当我试图Refresh Fields什么都没有被填充时,事实上我得到了错误Customers data has no fields

当我尝试单击时,Run我也收到错误消息[BC30205] End of statement expected

有人可以帮忙吗?

使用以下链接作为传递参数的参考: https ://community.snowflake.com/s/question/0D50Z00007DAa4MSAT/has-anyone-use-snowflake-as-datasource-for-mssql-ssrs-report-if-you-如何从 ssrs 传递变量到 Snowsql

谢谢

标签: reporting-servicesparametersparameter-passingsnowflake-cloud-data-platform

解决方案


表达式不正确,如果您需要在 SLECT 语句中使用双引号,那么您必须使用这样的双引号对。

="select * from ""Snowflake"".Past"".""Customer"" where cast(""startdate"" as date)  = '"  & Parameters!mydate.Value & "';"

另外,您已经转换为一种Date类型,但与 a 相比string,我不确定这是否可以?我对雪花一无所知,所以可能没问题


推荐阅读