- 最后登录
- 2014-8-19
- 在线时间
- 6 小时
- 威望
- 26
- 金钱
- 87
- 注册时间
- 2012-7-18
- 阅读权限
- 10
- 帖子
- 13
- 精华
- 0
- 积分
- 26
- UID
- 627
|
2#
发表于 2014-8-19 07:56:40
补充一下源和目标端的表结构如:
--源端表结构:
-- Create table
create table FUC
(
VENDER_ID VARCHAR2(32) not null,
FUC_NUM VARCHAR2(15) not null,
DOC_DATE DATE,
VENDEE_ID VARCHAR2(32),
ORD_MT_NUM VARCHAR2(15),
EARNEST NUMBER(20,6),
EARNEST_RATE NUMBER(7,4),
PUC_PROP CHAR(2),
OPR_ID VARCHAR2(32),
BUYER_ID VARCHAR2(32),
SELLER_ID VARCHAR2(32),
INVSG_AT DATE,
INVSG_ID VARCHAR2(32),
TAX_RATE NUMBER(7,4),
CURRENCY VARCHAR2(5),
RLN_VAL NUMBER(20,6),
CNTT_QTY NUMBER(15,6),
CNTT_VAL NUMBER(20,6),
CNTT_EXEC_QTY NUMBER(15,6),
CNTT_EXEC_VAL NUMBER(20,6),
CNTT_DELIV_QTY NUMBER(15,6),
CNTT_DELIV_VAL NUMBER(20,6),
RCV_QTY NUMBER(15,6),
RCV_VAL NUMBER(20,6),
CR_QTY NUMBER(15,6),
CR_VAL NUMBER(20,6),
BREACH_QTY NUMBER(15,6),
BREACH_VAL NUMBER(20,6),
BREACH_QTY2 NUMBER(20,6),
BREACH_VAL2 NUMBER(15,6),
UPPER_LIMIT NUMBER(7,4),
LOWER_LIMIT NUMBER(7,4),
SIGN_DATE DATE,
FST_DELIV_DATE DATE,
LAST_DELIV_DATE DATE,
CNT_FILE BLOB,
PROGRESS CHAR(2),
CANCEL_ID VARCHAR2(32),
CANCEL_AT DATE,
CANCELLED CHAR(1),
PRODUCT_COUNT NUMBER(15,6),
REMARK VARCHAR2(250),
REMARK2 VARCHAR2(250),
REMARK3 VARCHAR2(250),
REMARK4 NUMBER(15,6),
REMARK5 NUMBER(15,6),
DISP_WAREH_ID VARCHAR2(32),
SRC_DOC_TYPE VARCHAR2(5),
SRC_UNIT_ID VARCHAR2(32),
SRC_DOC_NUM VARCHAR2(15),
REMARK6 VARCHAR2(250),
REMARK7 VARCHAR2(250),
PROVIDE_TYPE VARCHAR2(32),
NEED_SEND VARCHAR2(2) default '10',
PROD_YEAR VARCHAR2(8),
PROD_SEASON VARCHAR2(15),
WIF_NUM VARCHAR2(32),
REMARK8 VARCHAR2(100),
REMARK9 VARCHAR2(100),
REMARK10 NUMBER(15,6),
BRAND_ID VARCHAR2(10),
IS_PRECOMMIT CHAR(1),
PRECOMMIT_QTY NUMBER(20,6),
PRECOMMIT_VAL NUMBER(15,6),
CNTT_FIRST_AT DATE,
CNTT_FIRST_INVID VARCHAR2(32),
CNTT_FIRST_QTY NUMBER(20,6),
CNTT_FIRST_VAL NUMBER(15,6),
CNTT_FIRST_BRE_QTY NUMBER(20,6),
CNTT_FIRST_BRE_VAL NUMBER(15,6),
CNTT_CURR_BRE_QTY NUMBER(20,6),
CNTT_CURR_BRE_VAL NUMBER(15,6),
BRE_ORD_NUMS NUMBER(20,6),
BRE_INV_NUMS NUMBER(20,6),
BRE_QTY NUMBER(20,6),
BRE_VAL NUMBER(15,6),
CANCELLED_REASON VARCHAR2(2),
IS_LOWER_ORDER CHAR(1),
LOWER_SHOP_ID VARCHAR2(32),
DPS_SEND VARCHAR2(2),
IS_PRECOMMIT_ID VARCHAR2(32),
LOWER_FUC_NUM VARCHAR2(15),
IS_UPPER_FUC CHAR(1),
IS_AUTO CHAR(1),
UPPER_VENDER_ID VARCHAR2(32),
UPPER_WAREH_ID VARCHAR2(32),
AUTO_APPROVE_FLAG CHAR(2),
BEGIN_DIST_TIME TIMESTAMP(6),
DIST_REMARK VARCHAR2(225),
PROD_PROPERTY VARCHAR2(2),
NEW_FUC_NUM VARCHAR2(16),
APPROVED VARCHAR2(2),
DATA_SOURCE VARCHAR2(2),
LEFT_LOAN NUMBER(25,6),
DIST_STATUS VARCHAR2(4) default 'IN',
ORDER_DIST_NUMBER NUMBER default 0,
FUC_TYPE VARCHAR2(3),
RESERV_TYPE VARCHAR2(3),
DIST_MSG VARCHAR2(255)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 16
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table FUC
add constraint PK_FUC8 primary key (VENDER_ID, FUC_NUM)
using index
tablespace INDX
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 1M
minextents 1
maxextents unlimited
);
-- Create/Recreate check constraints
alter table FUC
add constraint CKC_CANCELLED_FUC8
check (CANCELLED is null or ( CANCELLED in ('T','F') ));
-- Grant/Revoke object privileges
--目标端表结构:
/*Table structure for table `fuc` */
CREATE TABLE `fuc` (
`VENDER_ID` varchar(32) NOT NULL,
`FUC_NUM` varchar(15) NOT NULL,
`DOC_DATE` date DEFAULT NULL,
`VENDEE_ID` varchar(32) DEFAULT NULL,
`ORD_MT_NUM` varchar(15) DEFAULT NULL,
`EARNEST` decimal(20,6) DEFAULT NULL,
`EARNEST_RATE` decimal(7,4) DEFAULT NULL,
`PUC_PROP` char(2) DEFAULT NULL,
`OPR_ID` varchar(32) DEFAULT NULL,
`BUYER_ID` varchar(32) DEFAULT NULL,
`SELLER_ID` varchar(32) DEFAULT NULL,
`INVSG_AT` datetime DEFAULT NULL,
`INVSG_ID` varchar(32) DEFAULT NULL,
`TAX_RATE` decimal(7,4) DEFAULT NULL,
`CURRENCY` varchar(5) DEFAULT NULL,
`RLN_VAL` decimal(20,6) DEFAULT NULL,
`CNTT_QTY` decimal(15,6) DEFAULT NULL,
`CNTT_VAL` decimal(20,6) DEFAULT NULL,
`CNTT_EXEC_QTY` decimal(15,6) DEFAULT NULL,
`CNTT_EXEC_VAL` decimal(20,6) DEFAULT NULL,
`CNTT_DELIV_QTY` decimal(15,6) DEFAULT NULL,
`CNTT_DELIV_VAL` decimal(20,6) DEFAULT NULL,
`RCV_QTY` decimal(15,6) DEFAULT NULL,
`RCV_VAL` decimal(20,6) DEFAULT NULL,
`CR_QTY` decimal(15,6) DEFAULT NULL,
`CR_VAL` decimal(20,6) DEFAULT NULL,
`BREACH_QTY` decimal(15,6) DEFAULT NULL,
`BREACH_VAL` decimal(20,6) DEFAULT NULL,
`BREACH_QTY2` decimal(20,6) DEFAULT NULL,
`BREACH_VAL2` decimal(15,6) DEFAULT NULL,
`UPPER_LIMIT` decimal(7,4) DEFAULT NULL,
`LOWER_LIMIT` decimal(7,4) DEFAULT NULL,
`SIGN_DATE` date DEFAULT NULL,
`FST_DELIV_DATE` datetime DEFAULT NULL,
`LAST_DELIV_DATE` datetime DEFAULT NULL,
`CNT_FILE` longblob,
`PROGRESS` char(2) DEFAULT NULL,
`CANCEL_ID` varchar(32) DEFAULT NULL,
`CANCEL_AT` datetime DEFAULT NULL,
`CANCELLED` char(1) DEFAULT NULL,
`PRODUCT_COUNT` decimal(15,6) DEFAULT NULL,
`REMARK` varchar(250) DEFAULT NULL,
`REMARK2` varchar(250) DEFAULT NULL,
`REMARK3` varchar(250) DEFAULT NULL,
`REMARK4` decimal(15,6) DEFAULT NULL,
`REMARK5` decimal(15,6) DEFAULT NULL,
`DISP_WAREH_ID` varchar(32) DEFAULT NULL,
`SRC_DOC_TYPE` varchar(5) DEFAULT NULL,
`SRC_UNIT_ID` varchar(32) DEFAULT NULL,
`SRC_DOC_NUM` varchar(15) DEFAULT NULL,
`REMARK6` varchar(250) DEFAULT NULL,
`REMARK7` varchar(250) DEFAULT NULL,
`PROVIDE_TYPE` varchar(32) DEFAULT NULL,
`NEED_SEND` varchar(2) DEFAULT '10',
`PROD_YEAR` varchar(8) DEFAULT NULL,
`PROD_SEASON` varchar(15) DEFAULT NULL,
`WIF_NUM` varchar(32) DEFAULT NULL,
`REMARK8` varchar(100) DEFAULT NULL,
`REMARK9` varchar(100) DEFAULT NULL,
`REMARK10` decimal(15,6) DEFAULT NULL,
`BRAND_ID` varchar(10) DEFAULT NULL,
`IS_PRECOMMIT` char(1) DEFAULT NULL,
`PRECOMMIT_QTY` decimal(20,6) DEFAULT NULL,
`PRECOMMIT_VAL` decimal(15,6) DEFAULT NULL,
`CNTT_FIRST_AT` datetime DEFAULT NULL,
`CNTT_FIRST_INVID` varchar(32) DEFAULT NULL,
`CNTT_FIRST_QTY` decimal(20,6) DEFAULT NULL,
`CNTT_FIRST_VAL` decimal(15,6) DEFAULT NULL,
`CNTT_FIRST_BRE_QTY` decimal(20,6) DEFAULT NULL,
`CNTT_FIRST_BRE_VAL` decimal(15,6) DEFAULT NULL,
`CNTT_CURR_BRE_QTY` decimal(20,6) DEFAULT NULL,
`CNTT_CURR_BRE_VAL` decimal(15,6) DEFAULT NULL,
`BRE_ORD_NUMS` decimal(20,6) DEFAULT NULL,
`BRE_INV_NUMS` decimal(20,6) DEFAULT NULL,
`BRE_QTY` decimal(20,6) DEFAULT NULL,
`BRE_VAL` decimal(15,6) DEFAULT NULL,
`CANCELLED_REASON` varchar(2) DEFAULT NULL,
`IS_LOWER_ORDER` char(1) DEFAULT NULL,
`LOWER_SHOP_ID` varchar(32) DEFAULT NULL,
`DPS_SEND` varchar(2) DEFAULT NULL,
`IS_PRECOMMIT_ID` varchar(32) DEFAULT NULL,
`LOWER_FUC_NUM` varchar(15) DEFAULT NULL,
`IS_UPPER_FUC` char(1) DEFAULT NULL,
`IS_AUTO` char(1) DEFAULT NULL,
`UPPER_VENDER_ID` varchar(32) DEFAULT NULL,
`UPPER_WAREH_ID` varchar(32) DEFAULT NULL,
`AUTO_APPROVE_FLAG` char(2) DEFAULT NULL,
`BEGIN_DIST_TIME` datetime DEFAULT NULL,
`DIST_REMARK` varchar(225) DEFAULT NULL,
`PROD_PROPERTY` varchar(2) DEFAULT NULL,
`NEW_FUC_NUM` varchar(16) DEFAULT NULL,
`APPROVED` varchar(2) DEFAULT NULL,
`DATA_SOURCE` varchar(2) DEFAULT NULL,
`LEFT_LOAN` decimal(25,6) DEFAULT NULL,
`DIST_STATUS` varchar(4) DEFAULT 'IN',
`ORDER_DIST_NUMBER` double DEFAULT '0',
`FUC_TYPE` varchar(3) DEFAULT NULL,
`RESERV_TYPE` varchar(3) DEFAULT NULL,
`DIST_MSG` varchar(255) DEFAULT NULL,
PRIMARY KEY (`VENDER_ID`,`FUC_NUM`),
KEY `IDX_FUC` (`VENDEE_ID`,`REMARK2`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|