T-SQL – Identify and label each branch in a hierarchical structure
I am creating a cleansing view for a ledger table where transactions are stored with hierarchical structure in the source system. I want to create an additional colum ‘Group_Id’ identifying all the records which belong to the same transaction set.