t sql cte in a transaction code example Example: tsql cte in a transaction BEGIN TRANSACTION ;WITH CTE ..... SELECT.....etc. COMMIT TRANSACTION