/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MSPLAN_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_MSPLAN_DATACONFIG_L', 'T_MSPLAN_DATACONFIG_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_DATACONFIG_L') CREATE INDEX IDX_MSPLAN_DATACONFIG_L ON T_MSPLAN_DATACONFIG_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_MSPLAN_DATACONFIGENTRY', 'T_MSPLAN_DATACONFIGENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_DATACONFIGENTRY') CREATE INDEX IDX_MSPLAN_DATACONFIGENTRY ON T_MSPLAN_DATACONFIGENTRY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_T_MSPLAN_DATACONFIG', 'T_MSPLAN_DATACONFIG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_DATACONFIG') CREATE INDEX IDX_MSPLAN_DATACONFIG ON T_MSPLAN_DATACONFIG ( FNUMBER );



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