Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Comparing Rows
What I need to do is count the number of iterations for a particular
part-level combo. In addition, I need to count the iterations by layer
category - so if a change occurs below layer 8 anywhere, I should
increment cnt1; changes >= 8 increments cnt2.
So.. for the example above, there are 3 total iterations, 1 < 8 and 2 iterations >= 8. This is what I need to systematically determine. For now, I am trying to transpose the rows horizontally so that I can compare part-level1-layer1 to part-level2-layer1 (i.e., I need to compare level part7239-lvl9032-layer1 to part7239-lvl9199-layer1, if change occurred, increment cnt 1 and move to next lvl (comparing 7239-lvl9199-layer1 to 7239-lvl9517-layer1) and so on.
It is ver complicated for me to explain. I have over 5000 of these records in my tables to compare. I didn't want to add too much data to make it even more complicated. If I can determine some type of algorithm to do what I've tried to explain so far, I can probably figure out the rest (comparing the other parts).
Also, the layer numbers are not consistent across parts - this is why they are varchar2. Some have layers like AB1.0, B2.0, etc. So it is hard to systematically transpose the records horizontally for comparison.
I hope I have not confused you more. Received on Thu Jun 09 2005 - 18:43:15 CDT
![]() |
![]() |