CREATE FUNCTION dbo.get_new_inr_ssma 
( 
   @old_inr float(53)
)

RETURNS float(53)
AS 
   BEGIN
      DECLARE
         @active_spid INT, 
         @login_time DATETIME

      SET @active_spid = sysdb.ssma_oracle.GET_ACTIVE_SPID()
      SET @login_time = sysdb.ssma_oracle.GET_ACTIVE_LOGIN_TIME()

      DECLARE
         @return_value_argument float(53)

      EXECUTE master.dbo.xp_ora2ms_exec2_ex 
         @active_spid, 
         @login_time, 
         N'SSMA_ORACLE', 
         N'DBO', 
         N'GET_NEW_INR$IMPL', 
         N'false', 
         @old_inr, 
         @return_value_argument  OUTPUT

      RETURN @return_value_argument

   END
   GO
