Stored Procedures [HumanResources].[uspUpdateEmployeePersonalInfo]
Updates the Employee table with the values specified in the input parameters for the given EmployeeID.
PropertyValue
ANSI Nulls OnTrue
Quoted Identifier OnTrue
NameData TypeMax Length (Bytes)Description
@BusinessEntityIDint4Input parameter for the stored procedure uspUpdateEmployeePersonalInfo. Enter a valid BusinessEntityID from the HumanResources.Employee table.
@NationalIDNumbernvarchar(15)30Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a national ID for the employee.
@BirthDatedatetime8Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a birth date for the employee.
@MaritalStatusnchar1Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a marital status for the employee.
@Gendernchar1Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a gender for the employee.

CREATE PROCEDURE [HumanResources].[uspUpdateEmployeePersonalInfo]
   @BusinessEntityID [int],
   @NationalIDNumber [nvarchar](15),
   @BirthDate [datetime],
   @MaritalStatus [nchar](1),
   @Gender [nchar](1)
WITH EXECUTE AS CALLER
AS
BEGIN
   SET NOCOUNT ON;

   BEGIN TRY
       UPDATE [HumanResources].[Employee]
       SET [NationalIDNumber] = @NationalIDNumber
           ,[BirthDate] = @BirthDate
           ,[MaritalStatus] = @MaritalStatus
           ,[Gender] = @Gender
       WHERE [BusinessEntityID] = @BusinessEntityID;
   END TRY
   BEGIN CATCH
       EXECUTE [dbo].[uspLogError];
   END CATCH;
END;
GO
EXEC sp_addextendedproperty N'MS_Description', N'Updates the Employee table with the values specified in the input parameters for the given EmployeeID.', 'SCHEMA', N'HumanResources', 'PROCEDURE', N'uspUpdateEmployeePersonalInfo', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a birth date for the employee.', 'SCHEMA', N'HumanResources', 'PROCEDURE', N'uspUpdateEmployeePersonalInfo', 'PARAMETER', N'@BirthDate'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Input parameter for the stored procedure uspUpdateEmployeePersonalInfo. Enter a valid BusinessEntityID from the HumanResources.Employee table.', 'SCHEMA', N'HumanResources', 'PROCEDURE', N'uspUpdateEmployeePersonalInfo', 'PARAMETER', N'@BusinessEntityID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a gender for the employee.', 'SCHEMA', N'HumanResources', 'PROCEDURE', N'uspUpdateEmployeePersonalInfo', 'PARAMETER', N'@Gender'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a marital status for the employee.', 'SCHEMA', N'HumanResources', 'PROCEDURE', N'uspUpdateEmployeePersonalInfo', 'PARAMETER', N'@MaritalStatus'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a national ID for the employee.', 'SCHEMA', N'HumanResources', 'PROCEDURE', N'uspUpdateEmployeePersonalInfo', 'PARAMETER', N'@NationalIDNumber'
GO