Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » SQL/PSM Functions » INTRANSACTION |
INTRANSACTION([<TableName>]) <TableName> = Type of: CHARACTER|CHAR CHARACTER VARYING|VARCHAR GUID CHARACTER LARGE OBJECT|CLOB
BOOLEAN
-- This trigger checks to see if the -- current table is involved in a transaction -- and starts a transaction, if necessary. CREATE TRIGGER "CascadeChanges" AFTER UPDATE ON "customer" BEGIN DECLARE LocalTrans BOOLEAN DEFAULT FALSE; IF (NEWROW.CustNo <> OLDROW.CustNo) THEN IF NOT INTRANSACTION('customer') THEN START TRANSACTION ON TABLES 'customer'; SET LocalTrans=TRUE; END IF; BEGIN EXECUTE IMMEDIATE 'UPDATE Orders SET CustNo=? WHERE CustNo=?' USING NEWROW.CustNo,OLDROW.CustNo; IF LocalTrans THEN COMMIT; END IF; EXCEPTION IF LocalTrans THEN ROLLBACK; END IF; RAISE; END; END IF; END
Deviation | Details |
Extension | This function is an ElevateDB extension. |
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |