You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
889 B
61 lines
889 B
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE FUNCTION fn_BuildDumpPath(
|
|
@i_instance as bigint,
|
|
@i_build as int,
|
|
@i_suffix as varchar (50)
|
|
)
|
|
RETURNS varchar(256)
|
|
AS
|
|
BEGIN
|
|
DECLARE @Path as varchar(256)
|
|
DECLARE @hexpath as varchar (30)
|
|
DECLARE @dig as int
|
|
|
|
SET @hexpath = ''
|
|
while (@i_instance != 0)
|
|
BEGIN
|
|
SET @dig = @i_instance % 16
|
|
IF @dig < 10
|
|
BEGIN
|
|
SET @hexpath = CAST(@dig as varchar(1)) + @hexpath
|
|
END
|
|
ELSE
|
|
BEGIN
|
|
SET @hexpath = CAST(CAST((@dig + 0x41 - 10) as varbinary(1))
|
|
as varchar) + @hexpath
|
|
END
|
|
set @i_instance = CAST (@i_instance / 16 as int)
|
|
END
|
|
SET @Path = '\\tkwucdfsa02\whistlerbeta\archived\' +
|
|
CAST(@i_build as varchar(6)) + '\' +
|
|
@hexpath + @i_suffix
|
|
|
|
return (@Path)
|
|
END
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GO
|
|
SET QUOTED_IDENTIFIER OFF
|
|
GO
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
|