• Jan Van der Eecken - Monday, December 18, 2017 2:09 PM

    Change the

    IF @ID = NULL

    to

    IF @ID IS NULL

    You cannot compare a value directly to NULL.

    While this is correct advice, this proc looks a little weird to me. If @ID is NULL, you are inserting two rows to dbo.Employees, one with manager info (only) and one with employee info and a blank ManagerEmployeeID.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.