Created
January 2, 2018 16:16
-
-
Save codenamejason/f550bc6509003fe64c4ef182f973606e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF EXISTS(SELECT * FROM information_Schema.routines WHERE Specific_Name = 'LogStatus' ) | |
DROP PROCEDURE LogStatus | |
GO | |
CREATE PROCEDURE dbo.LogStatus(@Msg AS VARCHAR(MAX)=NULL) | |
AS | |
BEGIN | |
DECLARE @CurrTime AS VARCHAR(100) | |
SET @CurrTime = GETDATE() | |
set @msg = (select [Name] from sys.Filegroups where is_default=1) | |
+ ': ' + @Msg | |
IF @msg IS NULL | |
RAISERROR ('(%s) ',0,1, @CurrTime ) WITH NOWAIT | |
ELSE | |
RAISERROR ('(%s) %s',0,1, @CurrTime, @Msg) WITH NOWAIT | |
Insert Into CountyMessages(Message) values(@Msg) | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment