[rdld].[CheckVendorNumber]
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