|
I am trying to write a query which would allow me to add two columns and then shift the number to the row below. An example will better explain what I am doing. I thought this would work but it just is adding the two columns next to each other. Any thoughts??
(comments are locked)
|
|
My brain refuses to function normally at this time, so I couldn't find a way to do it with a SELECT. But since I did it with an UPDATE, I really can't see how it can be hard to do with a single SELECT. The problem for me is that it's not possible to do @i = @i + t2.OriginalValue and data retrieval in the same SELECT. Anyway, here's my UPDATE that does what you're looking for. Thanks an update statement will do
Oct 31 '11 at 03:42 PM
sqlnewb
(comments are locked)
|
gives
(comments are locked)
|

