/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MAL_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_MAL_ORDER_XY', 'T_MAL_ORDER_XY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MAL_ORDER_XY_FORDERID') CREATE INDEX IDX_MAL_ORDER_XY_FORDERID ON T_MAL_ORDER_XY ( FORDERID );


 EXEC P_ALTERPK 'PK_T_MAL_ORDERENTRY_XY', 'T_MAL_ORDERENTRY_XY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MAL_ENTRY_XY_FGOODSID') CREATE INDEX IDX_MAL_ENTRY_XY_FGOODSID ON T_MAL_ORDERENTRY_XY ( FGOODSID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MAL_ENTRY_XY_FID_FSEQ') CREATE INDEX IDX_MAL_ENTRY_XY_FID_FSEQ ON T_MAL_ORDERENTRY_XY ( FID ,FENTRYID );



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