/**Begin D:\pdm\PDM_UPGRADE\pdm_new\BDM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_BILL_ARCHIVE_CONFIG' AND KSQL_COL_NAME ='FBAK_ENTITY') 
 ALTER TABLE T_BDM_BILL_ARCHIVE_CONFIG ADD (FBAK_ENTITY NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_BILL_ARCHIVE_CONFIG' AND KSQL_COL_NAME ='FBAK_SENTITY') 
 ALTER TABLE T_BDM_BILL_ARCHIVE_CONFIG ADD (FBAK_SENTITY NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_BILL_ARCHIVE_CONFIG' AND KSQL_COL_NAME ='FBAK_TENTITY') 
 ALTER TABLE T_BDM_BILL_ARCHIVE_CONFIG ADD (FBAK_TENTITY NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_BILL_ARCHIVE_CONFIG' AND KSQL_COL_NAME ='FBAK_DATA') 
 ALTER TABLE T_BDM_BILL_ARCHIVE_CONFIG ADD (FBAK_DATA NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_BILL_ARCHIVE_CONFIG' AND KSQL_COL_NAME ='FBAK_BILLNO') 
 ALTER TABLE T_BDM_BILL_ARCHIVE_CONFIG ADD (FBAK_BILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_BILL_ARCHIVE_CONFIG' AND KSQL_COL_NAME ='FBAK_BATCH') 
 ALTER TABLE T_BDM_BILL_ARCHIVE_CONFIG ADD (FBAK_BATCH NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BDM_BILL_ARCHIVE_CONFIG' AND KSQL_COL_NAME ='FBAK_PK') 
 ALTER TABLE T_BDM_BILL_ARCHIVE_CONFIG ADD (FBAK_PK NVARCHAR(50) DEFAULT ' ' NOT NULL );

/**End D:\pdm\PDM_UPGRADE\pdm_new\BDM_table.sql **/
