reporting-services - 使用雪花数据源在 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
谢谢
解决方案
表达式不正确,如果您需要在 SLECT 语句中使用双引号,那么您必须使用这样的双引号对。
="select * from ""Snowflake"".Past"".""Customer"" where cast(""startdate"" as date) = '" & Parameters!mydate.Value & "';"
另外,您已经转换为一种Date
类型,但与 a 相比string
,我不确定这是否可以?我对雪花一无所知,所以可能没问题
推荐阅读
- c# - 从 JSON 中提取某些数据而不创建类
- java - 使用 FasterXML 解析 Json 以获取通用元素
- python - 根据python中的正则表达式匹配提取字符串之前和之后的字符串
- c# - 如何从 .NET Framework 4.6 迁移到 .NET Core 3.1
- powershell - 数组中数组的迭代导致完全限定错误Id:NullArray
- c# - 在一个项目中使用同一个 nuget 的两个不同版本来构建两个不同的应用程序?
- python - 将 n 行乘以 m 行,然后将它们加在一起
- xaml - Xaml 字符串格式货币负数转正数
- c# - 运行 Web 作业在启动时会出现 ArgumentNullException
- logging - Wildfly 18 日志策略不尊重 max-backup-index 并保留所有 server.log 文件