I have a table that looks like this:
--------------------------------------------
| Date | House# | Subscription |
--------------------------------------------
| 3/02/10 | x | Monthly |
--------------------------------------------
| 3/03/10 | y | Weekly |
--------------------------------------------
| 3/04/10 | z | Daily |
--------------------------------------------
I need a command that will take a column name and an int and shift the values in those columns up so many levels. So (house, 1) would put z where y is, y where x is, and z would go to 0/Null. Whereas (house, 2) would put z where x is and y and z would go to 0/null.
I understand that SQL does not actually extract ables row by row, so is this possible?
Thanks ahead of time!