/**Begin D:\PDM_UPGRADE\PDM1\HRPTMC_table.sql **/
 EXEC p_AlterColumn 'T_HRPTMC_SHARERECORD', 'FCONTENT', 'NVARCHAR(500)', 'NOT NULL', '1111', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRPTMC_SHARERECORD' AND KSQL_COL_NAME ='FF7QFILTER') 
 ALTER TABLE T_HRPTMC_SHARERECORD ADD (FF7QFILTER NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRPTMC_SHARERECORD' AND KSQL_COL_NAME ='FDATAQFILTER') 
 ALTER TABLE T_HRPTMC_SHARERECORD ADD (FDATAQFILTER NCLOB );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRPTMC_SHARERECORD' AND KSQL_COL_NAME ='FCOUNT') 
 ALTER TABLE T_HRPTMC_SHARERECORD ADD (FCOUNT INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRPTMC_SHARERECORD' AND KSQL_COL_NAME ='FTRACEID') 
 ALTER TABLE T_HRPTMC_SHARERECORD ADD (FTRACEID VARCHAR(150) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRPTMC_SHARERECORD' AND KSQL_COL_NAME ='FERRORMSG') 
 ALTER TABLE T_HRPTMC_SHARERECORD ADD (FERRORMSG VARCHAR(1000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_SHARERECORD_L') 
 CREATE TABLE T_HRPTMC_SHARERECORD_L (
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FCONTENT NVARCHAR(500) DEFAULT ' ' NOT NULL
);



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