/**Begin D:\software\PDM_UPGRADE\PDM1\FPM_table.sql **/
EXEC p_AlterColumn 'T_FPM_EXECUTEPLAN', 'FDETAILEXT8', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

EXEC p_AlterColumn 'T_FPM_EXECUTEPLAN', 'FDETAILEXT1', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

EXEC p_AlterColumn 'T_FPM_EXECUTEPLAN', 'FDETAILEXT2', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

EXEC p_AlterColumn 'T_FPM_EXECUTEPLAN', 'FDETAILEXT3', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

EXEC p_AlterColumn 'T_FPM_EXECUTEPLAN', 'FDETAILEXT4', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

EXEC p_AlterColumn 'T_FPM_EXECUTEPLAN', 'FDETAILEXT5', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

EXEC p_AlterColumn 'T_FPM_EXECUTEPLAN', 'FDETAILEXT6', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

EXEC p_AlterColumn 'T_FPM_EXECUTEPLAN', 'FDETAILEXT7', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_EXECUTEPLAN' AND KSQL_COL_NAME IN ('FDETAILEXT9'))
ALTER TABLE T_FPM_EXECUTEPLAN ADD (FDETAILEXT9 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_EXECUTEPLAN' AND KSQL_COL_NAME IN ('FDETAILEXT10'))
ALTER TABLE T_FPM_EXECUTEPLAN ADD (FDETAILEXT10 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_EXECUTEPLAN' AND KSQL_COL_NAME IN ('FDETAILEXT11'))
ALTER TABLE T_FPM_EXECUTEPLAN ADD (FDETAILEXT11 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_EXECUTEPLAN' AND KSQL_COL_NAME IN ('FDETAILEXT12'))
ALTER TABLE T_FPM_EXECUTEPLAN ADD (FDETAILEXT12 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_EXECUTEPLAN' AND KSQL_COL_NAME IN ('FDETAILEXT13'))
ALTER TABLE T_FPM_EXECUTEPLAN ADD (FDETAILEXT13 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_EXECUTEPLAN' AND KSQL_COL_NAME IN ('FDETAILEXT14'))
ALTER TABLE T_FPM_EXECUTEPLAN ADD (FDETAILEXT14 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_EXECUTEPLAN' AND KSQL_COL_NAME IN ('FDETAILEXT15'))
ALTER TABLE T_FPM_EXECUTEPLAN ADD (FDETAILEXT15 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_EXECUTEPLAN' AND KSQL_COL_NAME IN ('FDETAILEXT16'))
ALTER TABLE T_FPM_EXECUTEPLAN ADD (FDETAILEXT16 NVARCHAR(255) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT16'))
ALTER TABLE T_FPM_REPORTDATADETAIL ADD (FDETAILEXT16 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT15'))
ALTER TABLE T_FPM_REPORTDATADETAIL ADD (FDETAILEXT15 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT14'))
ALTER TABLE T_FPM_REPORTDATADETAIL ADD (FDETAILEXT14 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT13'))
ALTER TABLE T_FPM_REPORTDATADETAIL ADD (FDETAILEXT13 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT12'))
ALTER TABLE T_FPM_REPORTDATADETAIL ADD (FDETAILEXT12 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT11'))
ALTER TABLE T_FPM_REPORTDATADETAIL ADD (FDETAILEXT11 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT10'))
ALTER TABLE T_FPM_REPORTDATADETAIL ADD (FDETAILEXT10 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT9'))
ALTER TABLE T_FPM_REPORTDATADETAIL ADD (FDETAILEXT9 NVARCHAR(255) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_CHGREPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT16'))
ALTER TABLE T_FPM_CHGREPORTDATADETAIL ADD (FDETAILEXT16 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_CHGREPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT15'))
ALTER TABLE T_FPM_CHGREPORTDATADETAIL ADD (FDETAILEXT15 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_CHGREPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT14'))
ALTER TABLE T_FPM_CHGREPORTDATADETAIL ADD (FDETAILEXT14 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_CHGREPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT13'))
ALTER TABLE T_FPM_CHGREPORTDATADETAIL ADD (FDETAILEXT13 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_CHGREPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT12'))
ALTER TABLE T_FPM_CHGREPORTDATADETAIL ADD (FDETAILEXT12 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_CHGREPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT11'))
ALTER TABLE T_FPM_CHGREPORTDATADETAIL ADD (FDETAILEXT11 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_CHGREPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT10'))
ALTER TABLE T_FPM_CHGREPORTDATADETAIL ADD (FDETAILEXT10 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_CHGREPORTDATADETAIL' AND KSQL_COL_NAME IN ('FDETAILEXT9'))
ALTER TABLE T_FPM_CHGREPORTDATADETAIL ADD (FDETAILEXT9 NVARCHAR(255) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAILBAK' AND KSQL_COL_NAME IN ('FDETAILEXT8'))
ALTER TABLE T_FPM_REPORTDATADETAILBAK ADD (FDETAILEXT8 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAILBAK' AND KSQL_COL_NAME IN ('FDETAILEXT16'))
ALTER TABLE T_FPM_REPORTDATADETAILBAK ADD (FDETAILEXT16 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAILBAK' AND KSQL_COL_NAME IN ('FDETAILEXT15'))
ALTER TABLE T_FPM_REPORTDATADETAILBAK ADD (FDETAILEXT15 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAILBAK' AND KSQL_COL_NAME IN ('FDETAILEXT14'))
ALTER TABLE T_FPM_REPORTDATADETAILBAK ADD (FDETAILEXT14 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAILBAK' AND KSQL_COL_NAME IN ('FDETAILEXT13'))
ALTER TABLE T_FPM_REPORTDATADETAILBAK ADD (FDETAILEXT13 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAILBAK' AND KSQL_COL_NAME IN ('FDETAILEXT12'))
ALTER TABLE T_FPM_REPORTDATADETAILBAK ADD (FDETAILEXT12 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAILBAK' AND KSQL_COL_NAME IN ('FDETAILEXT11'))
ALTER TABLE T_FPM_REPORTDATADETAILBAK ADD (FDETAILEXT11 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAILBAK' AND KSQL_COL_NAME IN ('FDETAILEXT10'))
ALTER TABLE T_FPM_REPORTDATADETAILBAK ADD (FDETAILEXT10 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAILBAK' AND KSQL_COL_NAME IN ('FDETAILEXT7'))
ALTER TABLE T_FPM_REPORTDATADETAILBAK ADD (FDETAILEXT7 NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_REPORTDATADETAILBAK' AND KSQL_COL_NAME IN ('FDETAILEXT9'))
ALTER TABLE T_FPM_REPORTDATADETAILBAK ADD (FDETAILEXT9 NVARCHAR(255) DEFAULT ' ' NOT NULL );

/**End D:\software\PDM_UPGRADE\PDM1\FPM_table.sql **/
