Hello,
I need to increase a counter for each changed rows in SQL query .
I have a column holds values 0 or 1. Id like to create a new column based on the column C which holds 0 or 1. If the value is 0 then my new value will be 0 if it is 1 then my new column value at the first 1 then for the each value 1 will increase 1 (1,2,3...)
Please see the attached file. I have A,B,C columns and I'd like to create the column D.
Any help greatly appropriated.
I need to increase a counter for each changed rows in SQL query .
I have a column holds values 0 or 1. Id like to create a new column based on the column C which holds 0 or 1. If the value is 0 then my new value will be 0 if it is 1 then my new column value at the first 1 then for the each value 1 will increase 1 (1,2,3...)
Please see the attached file. I have A,B,C columns and I'd like to create the column D.
Any help greatly appropriated.