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 uspUpdateEmployeeLogin. Enter a valid EmployeeID from the Employee table. | ||
@ManagerID | INPUT | int | 4 | Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a valid ManagerID for the employee. | ||
@LoginID | INPUT | nvarchar | 256 | Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a valid login for the employee. | ||
@Title | INPUT | nvarchar | 50 | Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a title for the employee. | ||
@HireDate | INPUT | datetime | 8 | Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a hire date for the employee. | ||
@CurrentFlag | INPUT | Flag | 1 | Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the current flag for the employee. |
Objects that [HumanResources].[uspUpdateEmployeeLogin] 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].[uspUpdateEmployeeLogin]
@EmployeeID [int],
@ManagerID [int],
@LoginID [nvarchar](256),
@Title [nvarchar](50),
@HireDate [datetime],
@CurrentFlag [dbo].[Flag]
WITH EXECUTE AS CALLER
AS
BEGIN
SET NOCOUNT ON;
BEGIN TRY
UPDATE [HumanResources].[Employee]
SET [ManagerID] = @ManagerID
,[LoginID] = @LoginID
,[Title] = @Title
,[HireDate] = @HireDate
,[CurrentFlag] = @CurrentFlag
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