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

📄 ad_ref_list_trg.sql

📁 Java写的ERP系统
💻 SQL
字号:
CREATE OR REPLACE TRIGGER AD_Ref_List_Trg
AFTER INSERT OR UPDATE OF Name, Description
	ON AD_Ref_List
FOR EACH ROW
/*************************************************************************
 * The contents of this file are subject to the Compiere License.  You may
 * obtain a copy of the License at    http://www.compiere.org/license.html
 * Software is on an  "AS IS" basis,  WITHOUT WARRANTY OF ANY KIND, either
 * express or implied. See the License for details. Code: Compiere ERP+CRM
 * Copyright (C) 1999-2003 Jorg Janke, ComPiere, Inc. All Rights Reserved.
 *************************************************************************
 * $Id: AD_Ref_List_Trg.sql,v 1.2 2003/02/18 03:33:22 jjanke Exp $
 ***
 * Title:	Ref List Translation
 * Description:
 ************************************************************************/
BEGIN

	--	Insert AD_Ref_List Trigger 
	--		for Translation 
	IF INSERTING THEN
		--  Create Translation Row
		INSERT INTO AD_Ref_List_Trl
			(AD_Ref_List_ID, AD_Language, AD_Client_ID, AD_Org_ID,
			IsActive, Created, CreatedBy, Updated, UpdatedBy,
			Name, Description, IsTranslated)
		SELECT :new.AD_Ref_List_ID, AD_Language, :new.AD_Client_ID, :new.AD_Org_ID,
			:new.IsActive, :new.Created, :new.CreatedBy, :new.Updated, :new.UpdatedBy,
			:new.Name, :new.Description, 'N'
		FROM	AD_Language
		WHERE	IsActive = 'Y' AND IsSystemLanguage = 'Y';
	END IF;	-- Inserting

	--	AD_Ref_List update trigger
	--		synchronize name,... 
	IF UPDATING THEN
		UPDATE	AD_Ref_List_Trl
		SET		IsTranslated = 'N',
				Updated=SysDate
		WHERE	AD_Ref_List_ID = :new.AD_Ref_List_ID;
	END IF;	-- Updating

END AD_Ref_List_Trg;
/

⌨️ 快捷键说明

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