/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_constraint.sql **/
EXEC p_DropIdx 'T_BCM_StructOfAccountp_IDX', 'T_BCM_STRUCTOFACCOUNTP';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'T_BCM_STRUCTOFACCOUNTP_IDX') CREATE INDEX T_BCM_STRUCTOFACCOUNTP_IDX ON T_BCM_STRUCTOFACCOUNTP ( FREFERID );

 EXEC P_ALTERPK 'PK_T_BCM_CHECKTMPL_DETAIL', 'T_BCM_CHECKTMPL_DETAIL', 'FDETAILID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_CHECKTMPL_ELDETAIL', 'T_BCM_CHECKTMPL_ELDETAIL', 'FDETAILID', '1';

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



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