Skip to content

Instantly share code, notes, and snippets.

@LitKnd
Created April 25, 2019 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LitKnd/947cc5eae0969e1201a9d727524b5a61 to your computer and use it in GitHub Desktop.
Save LitKnd/947cc5eae0969e1201a9d727524b5a61 to your computer and use it in GitHub Desktop.
DECLARE @timeupdated NVARCHAR(256);
SELECT @timeupdated = CAST(SYSDATETIME() AS NVARCHAR);
IF
(
SELECT COUNT(*)
FROM fn_listextendedproperty('Most recent job update', DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT)
) = 0
BEGIN
EXEC sp_addextendedproperty @name = N'Most recent job update',
@value = @timeupdated;
END;
ELSE
BEGIN
EXEC sp_updateextendedproperty @name = N'Most recent job update',
@value = @timeupdated;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment