Forum Discussion
EpicTriffid
Mar 01, 2024Copper Contributor
Help Needed - updating rows based on rows of different category
Hi all,
Long time lurker, first time poster. I've been working with SSMS for about 4 years now, designing and deploying a db to host info from a front-end PowerApp. I learnt myself and it's probably a shitshow of design, but it works!
I have a question. In the db each person has their own unique row for each financial year. I need to update rows with the financial year of 2024/25, with whatever is in there for the same rows in 2023/24. Just one column. So, as an example, I need to update column x where row year = 2024/25 with the corresponding data in rows where year = 2023/24.
I could brute force by adding a clause of WHERE ID = '1' OR WHERE ID = '2' for all the relevant rows, but i was wondering if there is a more elegant way?
No RepliesBe the first to reply