SQL Server 2012 @@FETCH_STATUS problem

Your loop also uses "@wided" and "@vidMaster", but I don't see any code setting those values.