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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SM_SOMATCH_WFSEQ') CREATE INDEX IDX_SM_SOMATCH_WFSEQ ON T_SM_SOMATCH ( FWFSEQ );


 EXEC P_ALTERPK 'PK_T_SM_SOMATCHENTRY', 'T_SM_SOMATCHENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SM_SOMATCHENTRY_FID') CREATE INDEX IDX_SM_SOMATCHENTRY_FID ON T_SM_SOMATCHENTRY ( FID );

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



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