both make a call to this function which shown below
and that's where i think the error is originating
CREATE FUNCTION [dbo].[fnUTUnitTrustNAV] (
@UnitTrustID INT,
@ValueDate SMALLDATETIME
)
RETURNS @tbl TABLE (
[ID] BIGINT,
[CallBalance] DECIMAL(38, 5),
[TradingBalance] DECIMAL(38,...