/**Begin D:\PDM\PDM_UPGRADE\pdm1\CAS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_SMARTMATCH' AND KSQL_COL_NAME IN ('FDIRECTION'))
 ALTER TABLE T_CAS_SMARTMATCH ADD (FDIRECTION NVARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_SMARTMATCH' AND KSQL_COL_NAME IN ('FAUTOCONFIRM'))
 ALTER TABLE T_CAS_SMARTMATCH ADD (FAUTOCONFIRM CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_SMARTMATCH' AND KSQL_COL_NAME IN ('FBIZCONDITION'))
 ALTER TABLE T_CAS_SMARTMATCH ADD (FBIZCONDITION NVARCHAR(1024) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_SMARTMATCH' AND KSQL_COL_NAME IN ('FBIZCONDITIONREAL'))
 ALTER TABLE T_CAS_SMARTMATCH ADD (FBIZCONDITIONREAL NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_SMARTMATCH' AND KSQL_COL_NAME IN ('FBIZCONDITIONREAL_TAG'))
 ALTER TABLE T_CAS_SMARTMATCH ADD (FBIZCONDITIONREAL_TAG NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_SMARTMATCH' AND KSQL_COL_NAME IN ('FBIZDATEPROP'))
 ALTER TABLE T_CAS_SMARTMATCH ADD (FBIZDATEPROP NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_SMARTMATCH' AND KSQL_COL_NAME IN ('FENTRYBIZDATEPROP'))
 ALTER TABLE T_CAS_SMARTMATCH ADD (FENTRYBIZDATEPROP NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_SMARTMATCH_E' AND KSQL_COL_NAME IN ('FMATCHREL'))
 ALTER TABLE T_CAS_SMARTMATCH_E ADD (FMATCHREL NVARCHAR(50) DEFAULT ' ' NOT NULL );

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