/**Begin D:\PDM\PDM_UPGRADE\pdm1\BEI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_RECEDBILLENTRY' AND KSQL_COL_NAME IN ('FOPNUMBER'))
 ALTER TABLE T_BEI_RECEDBILLENTRY ADD (FOPNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_RECEDBILLENTRY' AND KSQL_COL_NAME IN ('FDIRECTION'))
 ALTER TABLE T_BEI_RECEDBILLENTRY ADD (FDIRECTION NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_TRANSDETAIL' AND KSQL_COL_NAME IN ('FSYNONYM'))
 ALTER TABLE T_BEI_TRANSDETAIL ADD (FSYNONYM CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_TRANSDETAIL' AND KSQL_COL_NAME IN ('FCONFIRMAMOUNT'))
 ALTER TABLE T_BEI_TRANSDETAIL ADD (FCONFIRMAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BEI_TRANSDETAIL' AND KSQL_COL_NAME IN ('FUNCONFIRMAMOUNT'))
 ALTER TABLE T_BEI_TRANSDETAIL ADD (FUNCONFIRMAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL );

/**End D:\PDM\PDM_UPGRADE\pdm1\BEI_table.sql **/
