/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_SM_REPORTTASK', 'T_SM_REPORTTASK', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SM_RT_FBILLNO') CREATE INDEX IDX_SM_RT_FBILLNO ON T_SM_REPORTTASK ( FBILLNO );


 EXEC P_ALTERPK 'PK_T_SM_SALPROFITMIDRESULT', 'T_SM_SALPROFITMIDRESULT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SM_SALPR_FREPTASK') CREATE INDEX IDX_SM_SALPR_FREPTASK ON T_SM_SALPROFITMIDRESULT ( FREPORTTASK );



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