Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

counter in a Sql statement

559353Feb 7 2007 — edited Feb 8 2007
Hi,

Given a column payment_type, where payment type varies, I need to count each time when the value of the payment_type changes and display the total count in the end.

For example,
payment_typ is 1 1 2 2 2 2 2 3 3 3 3 3 4. Total count should be 3. I need to traverse the values, capture the change and increment the counter.

Any help is appreciated.
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 8 2007
Added on Feb 7 2007
11 comments
602 views