简体   繁体   中英

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 . But with sum(z.IdealBalNew) OVER column it gives error . Error is : Incorrect syntax near "order" , Incorrect syntax near "z" , Microsoft sql error : 102. Same query executes properly in sqldbx database.

Any issue regarding " sum() OVER partition order by " not being supported by SSRS Visual Studio 2010 ?

Any issue regarding " sum() OVER partition order by " not being supported by SSRS Visual Studio 2010 ?

No, there is no such known issue. Probably you have a typo or some other difference in your SSRS code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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