CONDITIONAL_CHANGE_EVENT

This function assigns an event window number to each row, starting from 0, and increments by 1 when the result of evaluating the argument expression on the current row differs from that on the previous row.

Syntax

CONDITIONAL_CHANGE_EVENT ( expression ) OVER ( 
... [ window-partition-clause ] 
... window-order-clause  )

Example

SELECT orderid, 
EMPLOYEEID, 
SHIPNAME, 
CONDITIONAL_CHANGE_EVENT(EMPLOYEEID)    
   OVER (ORDER BY EMPLOYEEID)
   FROM /shared/examples/ds_orders/tutorial/orders

Remarks

CONDITIONAL_CHANGE_EVENT must contain an ORDER BY clause within its analytic clause