⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bugnet_customfieldselection_createnewcustomfieldselection.sql

📁 BugNET is an issue tracking and project issue management solution built using the ASP.NET web applic
💻 SQL
字号:
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[BugNet_CustomFieldSelection_CreateNewCustomFieldSelection]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[BugNet_CustomFieldSelection_CreateNewCustomFieldSelection]
GO


CREATE PROCEDURE [dbo].[BugNet_CustomFieldSelection_CreateNewCustomFieldSelection]
	@CustomFieldId Int,
	@CustomFieldSelectionValue NVarChar(255),
	@CustomFieldSelectionName NVarChar(255)
AS

DECLARE @CustomFieldSelectionSortOrder int
SELECT @CustomFieldSelectionSortOrder = ISNULL(MAX(CustomFieldSelectionSortOrder),0) + 1 FROM ProjectCustomFieldSelection

IF NOT EXISTS(SELECT CustomFieldSelectionId FROM ProjectCustomFieldSelection WHERE CustomFieldId = @CustomFieldId AND LOWER(CustomFieldSelectionName) = LOWER(@CustomFieldSelectionName) )
BEGIN
	INSERT ProjectCustomFieldSelection
	(
		CustomFieldId,
		CustomFieldSelectionValue,
		CustomFieldSelectionName,
		CustomFieldSelectionSortOrder
	)
	VALUES
	(
		@CustomFieldId,
		@CustomFieldSelectionValue,
		@CustomFieldSelectionName,
		@CustomFieldSelectionSortOrder
		
	)

	RETURN @@IDENTITY
END
RETURN 0



GO

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -