/**Begin D:\software\PDM_UPGRADE\PDM1\FPM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TEMPLATE_DIMSET' AND KSQL_COL_NAME IN ('FISDFSORTITEM'))
 ALTER TABLE T_FPM_TEMPLATE_DIMSET ADD (FISDFSORTITEM CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TEMPLATEBAK_DIMSET' AND KSQL_COL_NAME IN ('FISDFSORTITEM'))
 ALTER TABLE T_FPM_TEMPLATEBAK_DIMSET ADD (FISDFSORTITEM CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TEMPLATEINFO' AND KSQL_COL_NAME IN ('FQUERYABLERPTS'))
 ALTER TABLE T_FPM_TEMPLATEINFO ADD (FQUERYABLERPTS NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TEMPLATEINFO' AND KSQL_COL_NAME IN ('FQUERYABLEBS'))
 ALTER TABLE T_FPM_TEMPLATEINFO ADD (FQUERYABLEBS NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TEMPLATEINFO' AND KSQL_COL_NAME IN ('FDFQUERYTPL'))
 ALTER TABLE T_FPM_TEMPLATEINFO ADD (FDFQUERYTPL CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TEMPLATEINFO_BAK' AND KSQL_COL_NAME IN ('FQUERYABLERPTS'))
 ALTER TABLE T_FPM_TEMPLATEINFO_BAK ADD (FQUERYABLERPTS NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TEMPLATEINFO_BAK' AND KSQL_COL_NAME IN ('FQUERYABLEBS'))
 ALTER TABLE T_FPM_TEMPLATEINFO_BAK ADD (FQUERYABLEBS NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_TEMPLATEINFO_BAK' AND KSQL_COL_NAME IN ('FDFQUERYTPL'))
 ALTER TABLE T_FPM_TEMPLATEINFO_BAK ADD (FDFQUERYTPL CHAR(1) DEFAULT '0' NOT NULL );

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