UFN_INSTALLMENT_VALIDFORPLEDGE
Validates whether the installment id valid for the specified pledge id.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@INSTALLMENTID | uniqueidentifier | IN | |
@PLEDGEID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_INSTALLMENT_VALIDFORPLEDGE
(
@INSTALLMENTID uniqueidentifier,
@PLEDGEID uniqueidentifier
)
returns bit
with execute as caller
as
begin
declare @r as integer;
select @r=count(ID)
from dbo.INSTALLMENT
where INSTALLMENT.REVENUEID = @PLEDGEID
and INSTALLMENT.ID = @INSTALLMENTID;
if @r > 0
return 1;
return 0;
end