/**Begin D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_RIM_INPUT_TABLE')
 CREATE TABLE T_RIM_INPUT_TABLE (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FBATCH_NO VARCHAR(36) DEFAULT ' ' NOT NULL,
FSERIAL_NO VARCHAR(36) DEFAULT ' ' NOT NULL,
FINVOICETYPE BIGINT DEFAULT 0 NOT NULL,
FINVOICE_CODE VARCHAR(30) DEFAULT ' ' NOT NULL,
FINVOICE_NO VARCHAR(30) DEFAULT ' ' NOT NULL,
FINVOICE_DATE DATETIME,
FINVOICE_AMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTOTAL_TAX_AMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FEFFECTIVE_TAX_AMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINVOICE_STATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FAUTHENTICATE_FLAG VARCHAR(2) DEFAULT ' ' NOT NULL,
FDEDUCTION_PURPOSE VARCHAR(2) DEFAULT ' ' NOT NULL,
FMANAGE_STATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FSELECT_TIME DATETIME,
FAUTHENTICATE_TIME DATETIME,
FTAX_PERIOD DATETIME,
FSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FNOT_DEDUCTIBLE_TYPE VARCHAR(2) DEFAULT ' ' NOT NULL,
FORG BIGINT DEFAULT 0 NOT NULL,
FINVOICE_SOURCE NVARCHAR(20) DEFAULT ' ' NOT NULL,
FINVOICE_RISK_LEVEL NVARCHAR(20) DEFAULT ' ' NOT NULL,
FTAX_NO NVARCHAR(20) DEFAULT ' ' NOT NULL,
FSALER_TAX_NO NVARCHAR(20) DEFAULT ' ' NOT NULL,
FSALER_NAME NVARCHAR(120) DEFAULT ' ' NOT NULL,
FBUYER_NAME NVARCHAR(120) DEFAULT ' ' NOT NULL,
FBUYER_TAX_NO NVARCHAR(20) DEFAULT ' ' NOT NULL,
FTOTAL_AMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);


/**End D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_table.sql **/
