SSRS can it handle Over(Partition)?

I have this situation: I have a dataset with the following expresion:

Select distinct(COUNT(SheetNum)) as TagPerSheet, row_number() OVER(PARTITION BY SheetNum order by SheetNum) AS RowNumberfrom CCTag_64D776CDBAE5452780C2B7AA33490AA6 as T1 group by SheetNum Order By TagPerSheet Desc.

When I run it like this is SSRS it runs correctly but when I do it as text it doesnt run: =“Select distinct(COUNT(SheetNum)) as TagPerSheet, row_number() OVER(PARTITION BY SheetNum order by SheetNum) AS RowNumberfrom CCTag_64D776CDBAE5452780C2B7AA33490AA6 as T1 group by SheetNum Order By TagPerSheet Desc”

Any explenation for that?

Thanks

Are you getting a particular error message? Not sure if it’s just a copy/paste error, but it looks like there isn’t a space between “AS RowNumber” and “FROM CCTag…”. I would also double check to make sure that CCTag_GUID temporary table still exists when you’re testing the second expression.

I want back all the lost hours I spent on this idiotic error :sob: … You solved my issue - THANK YOU SO MUCH (BTW, the GUID was still avaialble)

2 Likes

For the record, if the query runs on your version MSSQL Server, it will run on the associated version of SSRS.

I mean, aside from the fact that SSRS hates duplicate column names. Everything else is fair game.