procedures key icon Procedure: uspUpdateEmployeeHireInfo

Properties

Property Value
Name uspUpdateEmployeeHireInfo
ID 183671702
Schema HumanResources
Owner dbo
Type SQL STORED PROCEDURE
Execute As Caller
Encrypted false
ANSI NULLS true
Uses Quoted Identifier true
Published false
Schema Published false
Execution Replicated false
Replication Serializable Only false
Skips Replication Constraints false
Is Recompiled false
Uses Database Collation false
Null on Null Input false
MS Shipped false
Modify Date 8/8/2010 5:23:46 PM
Create Date 8/8/2010 5:23:46 PM

Extended Properties

Name Value
MS_Description Updates the Employee table and inserts a new row in the EmployeePayHistory table with the values specified in the input parameters.

Permissions

No object level permissions defined.

Parameters

Parameter Name Datatype Output Cursor Ref Readonly Has Default Value Default Value Xml Collection Name Description
@BusinessEntityID int false false false false Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a valid BusinessEntityID from the Employee table.
@JobTitle nvarchar(50) false false false false Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a title for the employee.
@HireDate datetime false false false false Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a hire date for the employee.
@RateChangeDate datetime false false false false Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the date the rate changed for the employee.
@Rate money false false false false Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the new rate for the employee.
@PayFrequency tinyint false false false false Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the pay frequency for the employee.
@CurrentFlag Flag false false false false Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the current flag for the employee.

Objects that depend on [uspUpdateEmployeeHireInfo]

Objects on which [uspUpdateEmployeeHireInfo] depends

SQL

Script
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE PROCEDURE [HumanResources].[uspUpdateEmployeeHireInfo] @BusinessEntityID [int], @JobTitle [nvarchar](50), @HireDate [datetime], @RateChangeDate [datetime], @Rate [money], @PayFrequency [tinyint], @CurrentFlag [dbo].[Flag] WITH EXECUTE AS CALLER AS BEGIN SET NOCOUNT ON; BEGIN TRY BEGIN TRANSACTION; UPDATE [HumanResources].[Employee] SET [JobTitle] = @JobTitle ,[HireDate] = @HireDate ,[CurrentFlag] = @CurrentFlag WHERE [BusinessEntityID] = @BusinessEntityID; INSERT INTO [HumanResources].[EmployeePayHistory] ([BusinessEntityID] ,[RateChangeDate] ,[Rate] ,[PayFrequency]) VALUES (@BusinessEntityID, @RateChangeDate, @Rate, @PayFrequency); COMMIT TRANSACTION; END TRY BEGIN CATCH IF @@TRANCOUNT > 0 BEGIN ROLLBACK TRANSACTION; END EXECUTE [dbo].[uspLogError]; END CATCH; END;
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Updates the Employee table and inserts a new row in the EmployeePayHistory table with the values specified in the input parameters.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'PROCEDURE',@level1name=N'uspUpdateEmployeeHireInfo'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a valid BusinessEntityID from the Employee table.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'PROCEDURE',@level1name=N'uspUpdateEmployeeHireInfo', @level2type=N'PARAMETER',@level2name=N'@BusinessEntityID'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a title for the employee.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'PROCEDURE',@level1name=N'uspUpdateEmployeeHireInfo', @level2type=N'PARAMETER',@level2name=N'@JobTitle'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter a hire date for the employee.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'PROCEDURE',@level1name=N'uspUpdateEmployeeHireInfo', @level2type=N'PARAMETER',@level2name=N'@HireDate'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the date the rate changed for the employee.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'PROCEDURE',@level1name=N'uspUpdateEmployeeHireInfo', @level2type=N'PARAMETER',@level2name=N'@RateChangeDate'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the new rate for the employee.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'PROCEDURE',@level1name=N'uspUpdateEmployeeHireInfo', @level2type=N'PARAMETER',@level2name=N'@Rate'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the pay frequency for the employee.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'PROCEDURE',@level1name=N'uspUpdateEmployeeHireInfo', @level2type=N'PARAMETER',@level2name=N'@PayFrequency'
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Input parameter for the stored procedure uspUpdateEmployeeHireInfo. Enter the current flag for the employee.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'PROCEDURE',@level1name=N'uspUpdateEmployeeHireInfo', @level2type=N'PARAMETER',@level2name=N'@CurrentFlag'

See also

List of Procedures