Skip to main content
5 events
when toggle format what by license comment
Dec 3, 2018 at 10:40 comment added Scott Hodgin - Retired @knightbob472 - I added a cursor solution for you to test also.
Dec 3, 2018 at 10:40 history edited Scott Hodgin - Retired CC BY-SA 4.0
added additional cursor solution
Nov 30, 2018 at 14:06 comment added Scott Hodgin - Retired You'd have to test the performance of it against your full dataset and against other proposed solutions. You might need to add some indexes due to the window functions - you could search the internet for 'indexing for windows functions' or something along those lines. Hopefully, you will arrive at a solution that works for you :)
Nov 30, 2018 at 14:02 comment added user162241 thanks, do you think its an performance optimized solution? not sure if I have to use lead/lag just a thought, also, I would have to use lag(ProductCategory, 1, '') OVER (PARTITION BY ProductId ORDER BY LoadDate, over 10 columns, with group by at the end, I came up with another solution above 4 line, will have to performance test, this is nice solution however
Nov 30, 2018 at 13:01 history answered Scott Hodgin - Retired CC BY-SA 4.0