/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BCM_ANALYSOLUCOLUMNDIM', 'T_BCM_ANALYSOLUCOLUMNDIM', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_ANALYSOLUPAGEDIM', 'T_BCM_ANALYSOLUPAGEDIM', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_ANALYSOLUROWDIM', 'T_BCM_ANALYSOLUROWDIM', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BCM_ANALYTICSSOLUTIONS', 'T_BCM_ANALYTICSSOLUTIONS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_ANALYSOLUTION_MODEL') CREATE INDEX IDX_BCM_ANALYSOLUTION_MODEL ON T_BCM_ANALYTICSSOLUTIONS ( FMODELID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_ANALYSOLUTION_NUM') CREATE INDEX IDX_BCM_ANALYSOLUTION_NUM ON T_BCM_ANALYTICSSOLUTIONS ( FSOLUTIONNUMBER );


 EXEC P_ALTERPK 'PK_T_BCM_ANALYTICSSOLUTIONS_L', 'T_BCM_ANALYTICSSOLUTIONS_L', 'FPKID', '1';

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



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