UFN_PDACCOUNTSTRUCTURE_ACCOUNTEXISTS2
Returns 1 if any accounts have been defined for accounting system, 0 otherwise
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_PDACCOUNTSTRUCTURE_ACCOUNTEXISTS2(@ID uniqueidentifier)
returns bit
with execute as caller
as begin
declare @EXISTS bit;
if exists(
select *
from
dbo.GLACCOUNT where PDACCOUNTSYSTEMID = @ID
)
set @EXISTS = 1
else
set @EXISTS = 0
return @EXISTS;
end