UFN_BANKACCOUNT_ISOPEN_BASEDONDEPOSITID
This function returns the status of the bank account.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@DEPOSITID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_BANKACCOUNT_ISOPEN_BASEDONDEPOSITID(@DEPOSITID uniqueidentifier)
returns bit
with execute as caller
as begin
declare @ISOPEN bit
select @ISOPEN = BANKACCOUNT.STATUSCODE
from dbo.BANKACCOUNT
inner join dbo.BANKACCOUNTTRANSACTION on
BANKACCOUNT.ID = BANKACCOUNTTRANSACTION.BANKACCOUNTID
where BANKACCOUNTTRANSACTION.ID = @DEPOSITID
return @ISOPEN
end