January 9, 2018 at 3:58 pm
Row Over partition escapes me.
I wrote this:
I get error near '763093C1'. I feel like i should be closing this code somehow.
thanks
January 9, 2018 at 4:01 pm
(apologies as this is continuation of my topic from yesterday)
we ended up doing that report differently. This is just educational for me so i can learn how AND WHY this works.
thanks
January 9, 2018 at 4:14 pm
why what works? The ROW_NUMBER() OVER (PARTITION...) part?
PARTITION OVER is super simple - it's analogous to grouping in a totals/aggregate query, but you still get the individual records, which you don't get with a totals/aggregate query.
January 10, 2018 at 1:10 am
You start a subquery on line 6, but you never end it with a bracket nor alias the subquery. That should go between rows 10 and 11.
You'll also need to add the other columns you want returned to the sub query.
Also Partiton By .Created_Date
Either you've left out the table alias, or added an extra .
Columns don't start with . in T-SQL
p.s. Please don't post multiple questions for the same problem.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 10, 2018 at 2:43 am
This was removed by the editor as SPAM
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply