Stored Procedures [rdld].[GetCustomerInfo ]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@CustomerNumbervarchar(15)15
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
/****** Object:  StoredProcedure [rdld].[GetCustomerInfo] ******/
-- =============================================
-- Author:     Jeff Spindler
-- Date: 8/30/2021
-- Description:   Gets ABT PriKey for customer number
--                called at midnight
-- =============================================
CREATE PROCEDURE [rdld].[GetCustomerInfo ]
@CustomerNumber varchar(15)
AS
    BEGIN
        SET NOCOUNT ON;
        SET DEADLOCK_PRIORITY LOW;

        DECLARE    @return_value int,
        @outAlternateBillToID int

      EXEC    @return_value = [dbo].[GetAlternateBillToCustomer]
              @inCustomerNumber = @CustomerNumber,
              @inCustomerAddressCode = NULL,
              @outAlternateBillToID = @outAlternateBillToID OUTPUT;
      SELECT @CustomerNumber as CustomerNumber, @outAlternateBillToID as ABTPriKey
      for XML RAW;
      return @return_value;

    END;
GO
GRANT EXECUTE ON  [rdld].[GetCustomerInfo ] TO [MssExec]
GO
Uses