UFN_BANKACCOUNTDEPOSIT_GETTOTALAMOUNT
Returns the total amount of payments linked to this deposit
Return
Return Type |
---|
numeric(19, 4) |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_BANKACCOUNTDEPOSIT_GETTOTALAMOUNT
(
@ID uniqueidentifier
)
returns numeric(19,4)
with execute as caller
as begin
declare @TOTAL integer;
select @TOTAL = sum(amount)
from dbo.BANKACCOUNTPAYMENT
where BANKACCOUNTDEPOSITID=@ID
return @TOTAL
end