/* Formatted on 2018/3/15 10:07:48 (QP5 v5.256.13226.35538) */
--组织表
SELECT * FROM hr_organization_units_v;
--AR 事物处理安全性限制
BEGIN
mo_global.set_policy_context ('S', '107');
END;
-- 备份事物处理
CREATE TABLE bak.ra_customer_trx_all20120619
AS
SELECT *
FROM ra_customer_trx_all
WHERE trx_number = '10102672';
-- 检测备份情况
SELECT * FROM bak.ra_customer_trx_all20120619;
-- 修改事物处理
SELECT t.*, t.ROWID
FROM ra_customer_trx_all t
WHERE trx_number = '10102672';
-- 备份事物处理行
CREATE TABLE bak.ra_customer_trx_lines_all0619
AS
SELECT *
FROM ra_customer_trx_lines_all
WHERE customer_trx_id = 978317; --CUSTOMER_TRX_LINE_ID
-- 检测备份数据
SELECT * FROM bak.ra_customer_trx_lines_all0619;
-- 修改事物处理行
SELECT t.*, t.ROWID
FROM ra_customer_trx_lines_all t
WHERE customer_trx_id = 978317; --CUSTOMER_TRX_LINE_ID
-- 备份应收事物处理分配行
CREATE TABLE bak.ra_cust_trx_line_gl_dist0619
AS
SELECT *
FROM ra_cust_trx_line_gl_dist
WHERE customer_trx_id = 978317;
-- 检测备份数据
SELECT * FROM bak.ra_cust_trx_line_gl_dist0619;
-- 修改应收事物处理分配行
SELECT t.*, t.ROWID
FROM ra_cust_trx_line_gl_dist t
WHERE customer_trx_id = 978317;
-- 备份应收事物处理-税行
CREATE TABLE bak.zx_lines20120619
AS
SELECT *
FROM zx_lines
WHERE trx_number = '10102672';
-- 检测备份数据
SELECT * FROM bak.zx_lines20120619;
-- 修改应收事物处理-税行
SELECT t.*, t.ROWID
FROM zx_lines t
WHERE trx_number = '10102672';