I have a resultset of many rows and I want to write a case expression for comparing every second row in my result without hard coding the rownumber.
Every second row in my result is connected to each other.
Example:
1 Number1: 2345 Number2: 1111
2 Number1: 3456 Number2: 2222
3 Number1: 4567 Number3: 3333
4 Number1: 5678 Number4: 4444
Want to compare row 1 and 2 /3 and 4 and so on..
Any suggestion? I'm using SQL Developer 2008.
insert same data to two diffrent #table and compare using while loop as below,