Link to home
Start Free TrialLog in
Avatar of Loganathan Natarajan
Loganathan NatarajanFlag for India

asked on

Adjust column values with adjacent cell values

Hello,
I would like to know a better way of attaining this solution by writing sql query and with no temp table involved. I use CTE but I could not arrive at the solution, 1 screenshot is the current result and next screenshot is the expected result

User generated image
User generated image
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Loganathan Natarajan

ASKER

Thanks Ryan,

I thought of that way of having temp table and make the update accordingly to fetch the data as I need. But I would like to know is there any other sql Function to set this right in the query itself.