简体   繁体   English

查询正在sqldbx中执行,但未在SSRS中执行(Visual Studio 2010)

[英]Query is executing in sqldbx but not in SSRS ( Visual Studio 2010 )

My query is as follows : 我的查询如下:

SELECT LBrCode, PrdAcctId, EffFromDate, ACTUALDATE, ACTUALDATENEW, IdealBalDate, IdealBal,
 SancDate, TotSancLimit, ExpDate, NoOfInstl, InstlstartDt, InstlAmt, DpDate, TotalDpArrived, TotalDpAllowed, NEWDATE, IdealBalNew
, sum(z.IdealBalNew) OVER (partition BY z.LBrCode, z.PrdAcctId, datepart(MM, z.NEWDATE), datepart(yyyy, z.NEWDATE) ORDER BY LBrCode, PrdAcctId, NEWDATE) NEWESTBALANCE

FROM (

SUB QUERY

) z
--GROUP BY z.LBrCode, z.PrdAcctId, z.EffFromDate
ORDER BY LBrCode, PrdAcctId, EffFromDate

In the above query , When i comment the " sum(z.IdealBalNew) OVER " columns , the query is accepted in SSRS Report dataset . 在上面的查询中,当我注释“ sum(z.IdealBalNew)OVER”列时,该查询将在SSRS报告数据集中接受。 But with sum(z.IdealBalNew) OVER column it gives error . 但是使用sum(z.IdealBalNew)OVER列会给出error。 Error is : Incorrect syntax near "order" , Incorrect syntax near "z" , Microsoft sql error : 102. Same query executes properly in sqldbx database. 错误是:“ order”附近的语法不正确,“ z”附近的语法不正确,Microsoft sql错误:102。同一查询在sqldbx数据库中正确执行。

Any issue regarding " sum() OVER partition order by " not being supported by SSRS Visual Studio 2010 ? SSRS Visual Studio 2010不支持有关“ sum() OVER partition order by ”的问题吗?

Any issue regarding " sum() OVER partition order by " not being supported by SSRS Visual Studio 2010 ? SSRS Visual Studio 2010不支持有关“ sum()OVER分区顺序由”的问题吗?

No, there is no such known issue. 不,没有这样的已知问题。 Probably you have a typo or some other difference in your SSRS code. 您的SSRS代码可能有错别字或其他差异。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM