/**Begin D:\PDM_UPGRADE\PDM1\BRM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_SCENEINPUT' AND KSQL_COL_NAME ='FMULTIPLE') 
 ALTER TABLE T_BRM_SCENEINPUT ADD (FMULTIPLE CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_SCENEINPUT' AND KSQL_COL_NAME ='FCOMBOFIELD') 
 ALTER TABLE T_BRM_SCENEINPUT ADD (FCOMBOFIELD NVARCHAR(2000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_SCENEINPUT' AND KSQL_COL_NAME ='FDATEFORMAT') 
 ALTER TABLE T_BRM_SCENEINPUT ADD (FDATEFORMAT NVARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_SCENEOUTPUT' AND KSQL_COL_NAME ='FMULTIPLE') 
 ALTER TABLE T_BRM_SCENEOUTPUT ADD (FMULTIPLE CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_SCENEOUTPUT' AND KSQL_COL_NAME ='FCOMBOFIELD') 
 ALTER TABLE T_BRM_SCENEOUTPUT ADD (FCOMBOFIELD NVARCHAR(2000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_SCENEOUTPUT' AND KSQL_COL_NAME ='FDATEFORMAT') 
 ALTER TABLE T_BRM_SCENEOUTPUT ADD (FDATEFORMAT NVARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_TARGET' AND KSQL_COL_NAME ='FDATEFORMAT') 
 ALTER TABLE T_BRM_TARGET ADD (FDATEFORMAT NVARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_SCENEPARAM_TMP' AND KSQL_COL_NAME ='FDATEFORMAT') 
 ALTER TABLE T_BRM_SCENEPARAM_TMP ADD (FDATEFORMAT NVARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_TARGET_TMP' AND KSQL_COL_NAME ='FDATEFORMAT') 
 ALTER TABLE T_BRM_TARGET_TMP ADD (FDATEFORMAT NVARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_POLICY_TMP' AND KSQL_COL_NAME ='FSTATUS') 
 ALTER TABLE T_BRM_POLICY_TMP ADD (FSTATUS VARCHAR(2) DEFAULT 'C' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_SCENEPARAM_TMP' AND KSQL_COL_NAME ='FMULTIPLE') 
 ALTER TABLE T_BRM_SCENEPARAM_TMP ADD (FMULTIPLE CHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_SCENEPARAM_TMP' AND KSQL_COL_NAME ='FCOMBO') 
 ALTER TABLE T_BRM_SCENEPARAM_TMP ADD (FCOMBO NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BRM_TARGET_TMP' AND KSQL_COL_NAME ='FSTATUS') 
 ALTER TABLE T_BRM_TARGET_TMP ADD (FSTATUS VARCHAR(2) DEFAULT 'C' NOT NULL );

/**End D:\PDM_UPGRADE\PDM1\BRM_table.sql **/
