This Error appear when I try to call the user-defined function
Cannot find either column "dbo" or the user-defined function or aggregate "dbo.fn_IntCalc", or the name is ambiguous
Here is the user-defined function:
CREATE FUNCTION dbo.fn_IntCalc (@IntersetRate NUMERIC(6, 3) = 10,
@Amount NUMERIC(18, 5),
@FromDate DATE,
@ToDate DATE)
RETURNS NUMERIC(18, 5)
WITH EXECUTE AS CALLER
AS
BEGIN
DECLARE @IntCalculated NUMERIC(18, 5)
SELECT @IntCalculated = @Amount * ( ( @IntersetRate / 100.0 )
* ( DATEDIFF(d, @FromDate, @ToDate) / 365.0 ) )
RETURN ( ISNULL(@IntCalculated, 0) )
END
GO
And The calling part is:
SELECT dbo.fn_IntCalc(DEFAULT,2000,'Mar 1 2008','Mar 10 2008')