t-sql: dense rank that is increased at every occurence of a flag
user426 Published in April 27, 2018, 6:51 am
I have a table that has Parent Rows and Children Rows.
The table consists of an increasing sequence, a row indicating whether it is a child or a parent and a code. I need to create ranking (an increasing number) that is increased only at every occurrence of IsParent column (values:0,1).