Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> How to count how many times a field value changes ?
Hello
I'm quite new to sql, plsql and Pro-C. Do not laught, I DID NOT ask for it !
My problem is:
How to count how many times one column value changes, in relation
to one other column value
Ex: How many times does col2 change of values here :
col1 col2
111 221
111 222 change 1 111 221 change 2 111 222 change 3 112 221 change 4 112 221 112 222 change 5
113 222 change 6 113 221 change 7 113 223 change 8
I think it might not be done by one single request, and probably needs
a pls/sql program, with a cursor. But I thought I would ask, just in case.
So please, let me know !
Regards and thanks.
Xavier
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Thu Apr 16 1998 - 12:09:11 CDT