/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_SM_SIMULATEDETAILENTRY', 'T_SM_SIMULATEDETAILENTRY', 'FDETAILID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SM_SIMULATEDETAIL_FEID') CREATE INDEX IDX_SM_SIMULATEDETAIL_FEID ON T_SM_SIMULATEDETAILENTRY ( FENTRYID );


 EXEC P_ALTERPK 'PK_T_SM_SIMULATEQUOTE', 'T_SM_SIMULATEQUOTE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_SM_SIMULATEQUOTEENTRY', 'T_SM_SIMULATEQUOTEENTRY', 'FENTRYID', '1';

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



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