/**Begin D:\PDM_UPGRADE\PDM1\BCM_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_DEFINED_DPROPID') CREATE INDEX IDX_BCM_DEFINED_DPROPID ON T_BCM_STRUCTOFDEFINED ( FDPROPERTYID1 );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_DEFINED_DATATYPE') CREATE INDEX IDX_BCM_DEFINED_DATATYPE ON T_BCM_STRUCTOFDEFINED ( FDATATYPE ,FDIMENSIONID ,FMODELID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_STOFACCOUNT_S_CALTYPE') CREATE INDEX IDX_BCM_STOFACCOUNT_S_CALTYPE ON T_BCM_STRUCTOFACCOUNT_S ( FISCALTYPE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_ACCT_DPROPID') CREATE INDEX IDX_BCM_ACCT_DPROPID ON T_BCM_STRUCTOFACCOUNT ( FDPROPERTYID2 );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_ACCT_DPROPID1') CREATE INDEX IDX_BCM_ACCT_DPROPID1 ON T_BCM_STRUCTOFACCOUNT ( FDPROPERTYID1 );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_ACCT_DATATYPE') CREATE INDEX IDX_BCM_ACCT_DATATYPE ON T_BCM_STRUCTOFACCOUNT ( FDATATYPE ,FDIMENSIONID ,FMODELID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_PERMCLASS_ENTINAME') CREATE INDEX IDX_BCM_PERMCLASS_ENTINAME ON T_BCM_PERMCLASS_ENTITY ( FENTITYNAME ,FMODELID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_RPTADJDATA_QUERY') CREATE INDEX IDX_BCM_RPTADJDATA_QUERY ON T_BCM_RPTADJUSTDATA ( FMODELID ,FSCENEID ,FYEARID ,FPERIODID ,FORGID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BCM_CHKRPT_PHASE') CREATE INDEX IDX_BCM_CHKRPT_PHASE ON T_BCM_CHKREPORT ( FYEAR ,FPERIOD ,FORG ,FCURRENCY ,FPHASE );


/**End D:\PDM_UPGRADE\PDM1\BCM_constraint.sql **/
