我需要将 Bacice Salary 转换为十进制值,我想在其中给出
SELECT CONVERT(DECIMAL(10,2)
这是我的程序:
ALTER Procedure [dbo].[buson_getEMPLOYEEIDNAME_s]
(
@Month INT,
@Year INT
)
As
Begin
SELECT
EmpId, Name,
(BUSON_SALARYSTR.BASICSALARY / dbo.GetNoofDaysPerMonth(@Month, @Year)) *
(dbo.GetNoofDaysPerMonth(@Month, @Year) - dbo.NoofdaysAbsent(EmpId,@Month,@Year)) as Basicsalary ,BUSON_SALARYSTR.CODE
FROM
BUSON_EMP
INNER JOIN
BUSON_SALARYSTR ON BUSON_SALARYSTR.CODE = BUSON_EMP.SalaryStructure
AND BUSON_EMP.EmpId IN (SELECT DISTINCT T1.EmpId
FROM BUSON_ATTENDANCE T0
JOIN BUSON_ATTENCHILD T1 ON T0.DocEntry = T1.DocEntry AND Year(T0.DateofAttendance) = @Year AND MONTH(T0.DateofAttendance) = @Month)
End