PL/SQL: Count how often a value appears and subtotal it
508560Jun 26 2006 — edited Jun 27 2006I'm not the best at PL/SQL, but I'm trying and willing to learn.
I have some SQL that looks thru over 1 million rows in a DB and pulls back data and does decodes to make the data meaningful. My output looks like this right now
Row1 - Row2 - Row3 - Row4 - Row5
x a c d c
a c d b x
x c d b b
x x x a a
x a b b a
x = no answer
a = alpha
b = beta
c = charle
d = delta
My end goal is to try to do this: Is to try to figure out how many times x appears in a rows above, decode it from 'x' to 'no answer' and then spit out a subtotal. The same applies for A thru D as well.
Can anyone point out some PL/SQL examples that could help me out?
thanks