/**Begin D:\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm2\RIM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INVOICE_FILE' AND KSQL_COL_NAME ='FTAX_PDF_URL') 
 ALTER TABLE T_RIM_INVOICE_FILE ADD (FTAX_PDF_URL NVARCHAR(300) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INVOICE_FILE' AND KSQL_COL_NAME ='FTAX_OFD_URL') 
 ALTER TABLE T_RIM_INVOICE_FILE ADD (FTAX_OFD_URL NVARCHAR(300) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INVOICE_FILE' AND KSQL_COL_NAME ='FTAX_XML_URL') 
 ALTER TABLE T_RIM_INVOICE_FILE ADD (FTAX_XML_URL NVARCHAR(300) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INVOICE_FILE_HIS2' AND KSQL_COL_NAME ='FTAX_PDF_URL')
 ALTER TABLE T_RIM_INVOICE_FILE_HIS2 ADD (FTAX_PDF_URL NVARCHAR(300) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INVOICE_FILE_HIS2' AND KSQL_COL_NAME ='FTAX_OFD_URL')
 ALTER TABLE T_RIM_INVOICE_FILE_HIS2 ADD (FTAX_OFD_URL NVARCHAR(300) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_RIM_INVOICE_FILE_HIS2' AND KSQL_COL_NAME ='FTAX_XML_URL')
 ALTER TABLE T_RIM_INVOICE_FILE_HIS2 ADD (FTAX_XML_URL NVARCHAR(300) DEFAULT ' ' NOT NULL );
 --- drop TABLE --------- 不允许删除表T_RIM_LEQI_PURPOSE，请恢复pdm ------------------- 

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