USP_CURRENCYSET_BY_PDAACCOUNTID

Parameters

Parameter Parameter Type Mode Description
@PDAACCOUNTID uniqueidentifier IN

Definition

Copy


create procedure dbo.USP_CURRENCYSET_BY_PDAACCOUNTID
(
  @PDAACCOUNTID uniqueidentifier
)
as
begin
    -- Declare the Currency Set ID that we'll be working with for account

  declare @CURRENCYSETID uniqueidentifier;

  -- Use the Account ID to find the Currency Set's ID of the given Account

  select @CURRENCYSETID = CURRENCYSETID  
  from dbo.PDACCOUNTSYSTEM  
  where ID =  @PDAACCOUNTID;

  -- Return the Currency Set values anyone may need

  select
    ID,
    NAME,
    BASECURRENCYID,
    ISAPPUSERDEFAULT
  from
    dbo.CURRENCYSET
  where
    ID = @CURRENCYSETID;

end