代码
CREATE FUNCTION [dbo].[udf_MachineExpressive]
(
@TheoreticalDutyTwo DECIMAL(18,6),
@ActualCapacity DECIMAL(18,6)
)
RETURNS DECIMAL(18,6)
AS
BEGIN
DECLARE @ReturnValue DECIMAL(18,6)
--计算机器表现性
SELECT @ReturnValue=(CASE WHEN @TheoreticalDutyTwo = 0 THEN NULL WHEN @TheoreticalDutyTwo IS NULL THEN NULL WHEN @TheoreticalDutyTwo <> 0 THEN (ISNULL(@ActualCapacity,0) / @TheoreticalDutyTwo) END)
RETURN @ReturnValue
END
(
@TheoreticalDutyTwo DECIMAL(18,6),
@ActualCapacity DECIMAL(18,6)
)
RETURNS DECIMAL(18,6)
AS
BEGIN
DECLARE @ReturnValue DECIMAL(18,6)
--计算机器表现性
SELECT @ReturnValue=(CASE WHEN @TheoreticalDutyTwo = 0 THEN NULL WHEN @TheoreticalDutyTwo IS NULL THEN NULL WHEN @TheoreticalDutyTwo <> 0 THEN (ISNULL(@ActualCapacity,0) / @TheoreticalDutyTwo) END)
RETURN @ReturnValue
END