FUNCTION [dbo].[GetTotalSalary1_func] ( @emplID int, @month VARCHAR(50) = NULL ) RETURNS int AS BEGIN Declare @BSalaryHour int, @TotalSalary int, @TotalHoursWorked int Set @TotalHoursWorked = (Select OverallTime from MonthlyRecord where EmplID = @emplID AND Month = @month ) Set @TotalSalary = @BSalaryHour * @TotalHoursWorked -------------------------------------------------------------------------------------- -- Return the result of the function RETURN @TotalSalary END select dbo.GetTotalSalary1_func(5,'2013-dec')
Set @TotalSalary = @BSalaryHour * @TotalHoursWorked
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)