Tsql cte in a transaction