Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
650 views
in Technique[技术] by (71.8m points)

reporting services - Substitute command for OVER in SSRS

How can I implement the OVER() command in SSRS 2008?

Is there a trick to it, or am I stuck?

And if I am indeed not able to use OVER(), then how can I use PARTITION in a SSRS report?

OVER() satisfies my requirements, and Telerian (another member) was very helpful by pointing it out - but SSRS doesn't seem to be able to use it for reporting.

Every time I use a variant of OVER() or PARTITION in the SSRS SELECT statement, I get rebuffed by the system - any thoughts or work-arounds?

The error message that I was receiving from the 2008 Query Studio was:

The OVER SQL construct or statement is not supported.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This may be due to not including a column alias for the summarised column - the following SQL generates a usable dataset for me in SSRS:

select d.*, 
       ROW_NUMBER() over (partition by date order by id) rn 
from dbo.myTable d

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...