USP_BANKINGSYSTEM_GETDEFAULT

Parameters

Parameter Parameter Type Mode Description
@DEFAULTBANKINGSYSTEMID uniqueidentifier INOUT

Definition

Copy


CREATE procedure dbo.USP_BANKINGSYSTEM_GETDEFAULT
(
    @DEFAULTBANKINGSYSTEMID uniqueidentifier = null output
)
as
begin

    --If there is only one banking system active, grab it

    if (select count(BANKINGSYSTEM.ID) from dbo.UFN_BANKINGSYSTEM_BANKINGSYSTEMSLIST(0) BANKINGSYSTEM) = 1
    begin
        select top(1)
            @DEFAULTBANKINGSYSTEMID = BANKINGSYSTEM.ID
        from
            dbo.UFN_BANKINGSYSTEM_BANKINGSYSTEMSLIST(0) BANKINGSYSTEM;
    end
    else
    begin
        set @DEFAULTBANKINGSYSTEMID = null;
    end

end