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



 EXEC P_ALTERPK 'PK_T_BCM_ANALYSISCHART', 'T_BCM_ANALYSISCHART', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_ANALYSISCHARTCODE') CREATE INDEX IDX_BCM_ANALYSISCHARTCODE ON T_BCM_ANALYSISCHART ( FCODE );


 EXEC P_ALTERPK 'PK_T_BCM_ANALYSISCHARTACCOUN', 'T_BCM_ANALYSISCHARTACCOUN', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_BCM_CHARTACCOUNT') CREATE INDEX INDEX_BCM_CHARTACCOUNT ON T_BCM_ANALYSISCHARTACCOUN ( FACCOUNTID );


 EXEC P_ALTERPK 'PK_T_BCM_ANALYSISTHEMETYPE', 'T_BCM_ANALYSISTHEMETYPE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX__ANALYSISTHEMETYPENAME') CREATE INDEX IDX__ANALYSISTHEMETYPENAME ON T_BCM_ANALYSISTHEMETYPE ( FNAME );



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