/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_ADMINDIVISION' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BD_ADMINDIVISION ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_ADMINDIVISION' AND KSQL_COL_NAME ='FFULLNAME') 
 ALTER TABLE T_BD_ADMINDIVISION ADD (FFULLNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_ADMINDIVISION' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_BD_ADMINDIVISION ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_ADMINDIVISIONLEVEL' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BD_ADMINDIVISIONLEVEL ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_MEASUREUNIT' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BD_MEASUREUNIT ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_CURRENCY' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BD_CURRENCY ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_CURRENCY' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_BD_CURRENCY ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_COUNTRY' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_BD_COUNTRY ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_COUNTRY' AND KSQL_COL_NAME ='FFULLNAME') 
 ALTER TABLE T_BD_COUNTRY ADD (FFULLNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_COUNTRY' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_BD_COUNTRY ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_TIMEZONE' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_INT_TIMEZONE ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_TIMEZONE' AND KSQL_COL_NAME ='FSIMPLECODE') 
 ALTER TABLE T_INT_TIMEZONE ADD (FSIMPLECODE NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_TIMEZONE' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_INT_TIMEZONE ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_FORMATPLAN' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_INT_FORMATPLAN ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_FORMATPLAN' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_INT_FORMATPLAN ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_LANGUAGE' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_INT_LANGUAGE ADD (FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_INT_LANGUAGE' AND KSQL_COL_NAME ='FDESCRIPTION') 
 ALTER TABLE T_INT_LANGUAGE ADD (FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL );

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