Thanks Carla,
Yeah I missed to include declare statement, sorry for inconvenience.
Reader,
Kindly add these declare statement in script existing in first table of the article.
[font="Courier New"]DECLARE @CTO INT
DECLARE @DevManager INT
DECLARE @TESTManager INT
DECLARE @DevLead1 INT
DECLARE @DevLead2 INT
DECLARE @TESTLead INT[/font]