First off, Im a SQL Server developer trying to adjust to Oracle(im using TOAD) so Im feeling some growing pains but Im doing ok. I have been tasked with trying to figure out how to do the following. We have a webpage that we let end users customize. They can create banners and headers, etc....With that said, they will have the ability to move the 'tables' around on the page. They can also have multiple columns in 1 table on the page and if they would like to move one of the columns up then it will create its own row(table). The db has a table that we will be updating the ordinal positionj on the page for each table and if a row has multiple columns(3 max) they have a sub-ordinal position. In SQL I think I would be able to use CTE to iterate through the rows and columns and set their new positions? I have an excel spreadsheet that has examples for moving tables/columns up and what the outcome should be but and here are a few as well...
Moving bottom left column(5.1) up Outcome
4.0 4.0 (stays the same)
5.1 6.2 5.0 (5.1 becomes its own row 5.0)
6.0 (6.2 becomes its own row 6.0)
Moving bottom left column (5.1) up Outcome
5.1 6.2 7.3 5.0 (5.1 = 5.0)
6.1 7.2 (6.2 = 6.1 and 7.3 = 7.2)