Hi,
I am new to Oracle and started to write procedures to fetch records of certain years and do a comparison between 3 years. Once that is computed, I need to do a division between third year and the first year(C/A). ALso need to do a division between third year and second Year (C/B).
Below is the example:
Month 1 Month 2
1998 A A
1999 B B
2000 C C
C/A C/A
C/B C/B
1999 A A
2000 B B
2001 C C
C/A C/A
C/B C/B
I am stuck with the division part because I am getting too may rows error.
I would like to know how can I write a cursor to put in the division values for the each 3 years comparison?
I would really appreaciate if someone could help me give me guidance in writing cursors because I don't know the best way to solve this problem?
Please help.
Thank you.
I am new to Oracle and started to write procedures to fetch records of certain years and do a comparison between 3 years. Once that is computed, I need to do a division between third year and the first year(C/A). ALso need to do a division between third year and second Year (C/B).
Below is the example:
Month 1 Month 2
1998 A A
1999 B B
2000 C C
C/A C/A
C/B C/B
1999 A A
2000 B B
2001 C C
C/A C/A
C/B C/B
I am stuck with the division part because I am getting too may rows error.
I would like to know how can I write a cursor to put in the division values for the each 3 years comparison?
I would really appreaciate if someone could help me give me guidance in writing cursors because I don't know the best way to solve this problem?
Please help.
Thank you.