/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HPDI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HPDI_SUBAPISETINDETAIL_L') 
 CREATE TABLE T_HPDI_SUBAPISETINDETAIL_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HPDI_SUBAPISETOTDETAIL_L') 
 CREATE TABLE T_HPDI_SUBAPISETOTDETAIL_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FAPIFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


 EXEC p_AlterColumn 'T_HPDI_MSGRECEIVE', 'FNUMBER', 'VARCHAR(60)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_HPDI_MSGRECEIVE', 'FMSGCONTENT', 'NCLOB', 'NULL', '1111', 'NULL';

 EXEC p_AlterColumn 'T_HPDI_SUBAPISETOTDETAIL', 'FAPIFIELDTYPE', 'VARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_HPDI_SUBAPISETOTDETAIL', 'FENTITYNAME', 'VARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_HPDI_SUBAPISETOTDETAIL', 'FAPIFIELDNAME', 'NVARCHAR(255)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_HPDI_SUBAPISETOTDETAIL', 'FAPIFIELDKEY', 'VARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_HPDI_SUBAPISETINDETAIL', 'FFIELDNAME', 'NVARCHAR(255)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_HPDI_SUBAPISETINDETAIL', 'FFIELDKEY', 'VARCHAR(255)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_HPDI_SUBAPISETINDETAIL', 'FFIELDTYPE', 'VARCHAR(255)', 'NOT NULL', '0100', ''' ''';


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