SSMS – If other problem

You must wrap your IF/OTHER in TO START and END statements to run multiple statements when @MCODE_VALIDATION = 0 (IF) or @MCODE_VALIDATION! = 0 (OTHER).

If you do not do this, only the first instruction will be executed.

You could do something like this

IF (@MCODE_VALIDATION = 0)
TO START
INSERT INTO dbo.list VALUES (& # 39; TEST & # 39; TEST & # 39; TEST & # 39;);
GOTO GENERATE_CHILD;
END
ELSE - Incorrect Syntax Near Keyword & # 39; ELSE & # 39; ?
TO START
PRINT NOT 'OK';
GOTO GENERATE_MOTHER;
END