You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE OR ALTER FUNCTION fn_CreateAdHocJobName(@JobPurpose SYSNAME)
RETURNS SYSNAME
AS
BEGIN
declare @t varbinary(16)
select top 1 @t = cast(login_time as varbinary(6)) + cast(GETUTCDATE() as varbinary(4)) + cast(@@SPID as varbinary(2)) from sys.sysprocesses where SPID = @@SPID