astruthers 75845 - Thursday, March 14, 2019 9:26 PM
You tested this in SSMS? Interesting. I also tested before I posted and it worked as I said both in 2008 SSMS against an SQL Server 2008 installation and SSMS revs 17.2 and 17.91 against a 2016 SQL Server installation... what version of SSMS are you using?
Just in case there's a doubt, here's what I got when I did the very same thing you did to script the procedure back out...
/****** Object: StoredProcedure [dbo].[uspLogError] Script Date: 3/15/2019 12:28:54 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- uspLogError logs error information in the ErrorLog table about the
-- These notes will NOT get persisted with the object
-- and will NOT be available to future developers scripting this object from SSMS
CREATE PROCEDURE [dbo].[uspLogError]
@ErrorLogID [int] = 0 OUTPUT -- contains the ErrorLogID of the row inserted
AS -- by uspLogError in the ErrorLog table
BEGIN
SET NOCOUNT ON;
Select 1;
END
GO
The comments where saved as a part of the stored procedure.
--Jeff Moden
Change is inevitable... Change for the better is not.