| Owner: | HumanResources |
| Encrypted: | |
| Creation Date: | 04/26/2006 |
| Modification Date: | |
| Description: | Updates the Employee table with the values specified in the input parameters for the given EmployeeID. |
| QUOTED_IDENTIFIER: | |
| ANSI_NULLS: |
| Name | Direction | DataType | Length | Default | Description | |
| @EmployeeID | INPUT | int | 4 | Input parameter for the stored procedure uspUpdateEmployeePersonalInfo. Enter a valid EmployeeID from the HumanResources.Employee table. | ||
| @NationalIDNumber | INPUT | nvarchar | 15 | Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a national ID for the employee. | ||
| @BirthDate | INPUT | datetime | 8 | Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a birth date for the employee. | ||
| @MaritalStatus | INPUT | nchar | 1 | Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a marital status for the employee. | ||
| @Gender | INPUT | nchar | 1 | Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a gender for the employee. |
Objects that [HumanResources].[uspUpdateEmployeePersonalInfo] depends on
| Object Name | Owner | Object Type | Dep Level | |
| Flag | dbo | User Defined type | 1 | |
| Name | dbo | User Defined type | 1 | |
| NameStyle | dbo | User Defined type | 1 | |
| Phone | dbo | User Defined type | 1 | |
| Contact | Person | Table | 2 | |
| ErrorLog | dbo | Table | 2 | |
| uspPrintError | dbo | Procedure | 2 | |
| Employee | HumanResources | Table | 3 | |
| uspLogError | dbo | Procedure | 3 |
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [HumanResources].[uspUpdateEmployeePersonalInfo]
@EmployeeID [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 [EmployeeID] = @EmployeeID;
END TRY
BEGIN CATCH
EXECUTE [dbo].[uspLogError];
END CATCH;
END;
GO
SET QUOTED_IDENTIFIER OFF
GO
GO
SET ANSI_NULLS OFF
GO
See Also
List of stored procedures