Stored Procedures [rdld].[CheckVendorNumber]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inVendorNumbervarchar(15)15
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
/****** Object:  StoredProcedure [rdld].[CheckVendorNumber]    Script Date: 8/28/2020 10:18:55 AM ******/
-- =============================================
-- Author:     Jeff Spindler
-- Date: 7/28/22
-- Description:   Gets the table
-- =============================================
CREATE PROCEDURE [rdld].[CheckVendorNumber]
    @inVendorNumber varchar( 15 )
AS
    BEGIN
    SET NOCOUNT ON
    SET DEADLOCK_PRIORITY LOW;

    DECLARE    @outVendorExistsFlag bit;
    exec dbo.VerifyVendorNumber
       @inVendorNumber,
       @outVendorExistsFlag = @outVendorExistsFlag output
       if(@outVendorExistsFlag = 1)
       BEGIN
         select 0 as ErrorCode, 'Vendor Number good' as ErrorMessage for xml RAW;
       END
       ELSE
       BEGIN
         select 1 as ErrorCode, 'Vendor Number ' + @inVendorNumber + ' not found' as ErrorMessage for xml RAW;
       END
    END;
GO
GRANT EXECUTE ON  [rdld].[CheckVendorNumber] TO [MssExec]
GO
Uses