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

📄 c_uom_trg.sql

📁 Java写的ERP系统
💻 SQL
字号:
CREATE OR REPLACE TRIGGER C_UOM_Trg
AFTER INSERT OR UPDATE OF UOMSymbol, Name, Description
	ON C_UOM
FOR EACH ROW
DECLARE
/*************************************************************************
 * 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-2002 Jorg Janke, ComPiere, Inc. All Rights Reserved.
 *************************************************************************
 * $Id: C_UOM_Trg.sql,v 1.2 2002/09/13 06:03:44 jjanke Exp $
 ***
 * Title:	UOM Translation
 * Description:
 ************************************************************************/
BEGIN
	IF INSERTING THEN
    	--  Create Translation Row
	    INSERT INTO C_UOM_Trl
    	    (C_UOM_ID, AD_Language, AD_Client_ID, AD_Org_ID,
        	IsActive, Created, CreatedBy, Updated, UpdatedBy,
	        UOMSymbol, Name, Description, IsTranslated)
    	SELECT :new.C_UOM_ID, AD_Language, :new.AD_Client_ID, :new.AD_Org_ID,
        	:new.IsActive, :new.Created, :new.CreatedBy, :new.Updated, :new.UpdatedBy,
	        :new.UOMSymbol, :new.Name, :new.Description, 'N'
    	FROM    AD_Language
	   	WHERE	IsActive = 'Y' AND IsSystemLanguage = 'Y';
	END IF;	--	Inserting

	IF UPDATING THEN
		-- Translation
		UPDATE	C_UOM_Trl
		SET		IsTranslated = 'N',
				Updated=SysDate
		WHERE	C_UOM_ID = :new.C_UOM_ID;
	END IF;	--	Updating

END C_UOM_Trg;
/

⌨️ 快捷键说明

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