/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\GL_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_EVENTENTRY' AND KSQL_COL_NAME ='FENTRYMPFORMULA') 
 ALTER TABLE T_AI_EVENTENTRY ADD (FENTRYMPFORMULA NVARCHAR(1000) DEFAULT ' ' );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_EVENTENTRY' AND KSQL_COL_NAME ='FENTRYMFORMULADESC') 
 ALTER TABLE T_AI_EVENTENTRY ADD (FENTRYMFORMULADESC NVARCHAR(1000) DEFAULT ' ' );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_EVENTENTRY' AND KSQL_COL_NAME ='FENTRYMFORMULADESC_TAG') 
 ALTER TABLE T_AI_EVENTENTRY ADD (FENTRYMFORMULADESC_TAG NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_EVENTFIELDS' AND KSQL_COL_NAME ='FMUSTINPUTFORMULA') 
 ALTER TABLE T_AI_EVENTFIELDS ADD (FMUSTINPUTFORMULA NVARCHAR(1000) DEFAULT ' ' );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_EVENTFIELDS' AND KSQL_COL_NAME ='FMPFORMULADESC') 
 ALTER TABLE T_AI_EVENTFIELDS ADD (FMPFORMULADESC NVARCHAR(1000) DEFAULT ' ' );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_EVENTFIELDS' AND KSQL_COL_NAME ='FMPFORMULADESC_TAG') 
 ALTER TABLE T_AI_EVENTFIELDS ADD (FMPFORMULADESC_TAG NCLOB );


/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\GL_table.sql **/
