我是新手,我想问一下,如果我点击组织结构图中的特定区块,它会转到特定的 USE [myDatabase]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[MyTableProc]
(@UserId char(20))
AS
BEGIN
DECLARE @error varchar(200)
DECLARE @warning varchar(300)
DECLARE @timeDiff smallint
DECLARE @onGoingSession bit = 1
DECLARE @userName char(20)
DECLARE @counterOfResync tinyint
SET @counterOfResync = (SELECT [Col1] FROM MyTable)
SET @userName = (SELECT [Col2] FROM MyTable)
SET @onGoingSession = (SELECT [Col3] FROM MyTable)
SET @timeDiff = (SELECT DATEDIFF(MINUTE, Col4, CURRENT_TIMESTAMP) from MyTable)
BEGIN TRANSACTION
IF(@onGoingSession = 1)
BEGIN
IF(@timeDiff >= 360)
BEGIN
UPDATE MyTable
SET UserId = @UserId, Col4 = CURRENT_TIMESTAMP
IF(@@ERROR = 0)
BEGIN
SET @warning = RTRIM('An unfinsihed session for ' +
LTRIM(RTRIM(@userName)) + ' is going on for the past ' +
LTRIM(RTRIM(@timeDiff)) + ' minutes but updates from ' + LTRIM(RTRIM(@UserId)) + ' are successful')
COMMIT
RAISERROR(@warning,7, 1)
RETURN
END
ELSE
BEGIN
ROLLBACK
RETURN @@ERROR
END
END
ELSE
BEGIN
SET @error = RTRIM('A session of updates for '+ LTRIM(RTRIM(@userName))+ ' is already in progress concurrent updates are not allowed')
IF(@@ERROR = 0)
BEGIN
COMMIT
RAISERROR(@error, 8, 1)
RETURN
END
ELSE
BEGIN
ROLLBACK
RETURN @@ERROR
END
END
END
ELSE IF(@onGoingSession = 0 AND @counterOfResync = 0)
BEGIN
UPDATE MyTable
SET UserId = @UserId, Col3 = 1, Col4 = CURRENT_TIMESTAMP
IF(@@ERROR =0)
BEGIN
COMMIT
RETURN
END
ELSE
BEGIN
ROLLBACK
RETURN @@ERROR
END
END
ELSE IF(@onGoingSession = 0 AND @counterOfResync > 0 AND @timeDiff >= 5)
BEGIN
UPDATE MyTable
SET Col3 = 1, CountOfResync = 0, UserId = @UserId, Col4 =
CURRENT_TIMESTAMP
IF(@@ERROR = 0)
BEGIN
COMMIT
RETURN
END
ELSE
BEGIN
ROLLBACK
RETURN @@ERROR
END
END
ELSE
BEGIN
SET @error = RTRIM('A server resync session already in progress, updates can''t be made at the same time')
IF(@@ERROR = 0)
BEGIN
COMMIT
RAISERROR(@error, 9, 1)
RETURN
END
ELSE
BEGIN
ROLLBACK
RETURN @@ERROR
END
END
RETURN @@ERROR
END
链接。事情是我正在使用的组织结构图是在1张图片
我想要的是当我单击左第一行中的第一个块时,它转到href
,当我点击左第二行中的第二个块时,它转到link A
还是有其他办法接近吗?也许是一些链接 P.S:现在,组织结构图在一张图片中