>Nope, only once. The rest of time would have been spent on the next problem. :)) Which is: how to sort and array based on a combination of rows, instead of columns. :) Now, give me the solution with the cursor! :))
Simple: transpose, sort, transpose back :).
You know the teapot principle? The question goes "you got a teapot, a stove, electricity, water, sugar, spoon, tea. Make tea", and the answer is "pour the water into the teapot, put on the stove, heat it until it boils, add tea, keep a while, remove the tea and add sugar". "Fine, now for another one: everything the same as before, just the water is already boiling" - "remove water and proceed as in the last one which we solved already".