/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FA_constraint.sql **/
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_ASSET_DEVALUE_INFO' AND KSQL_INDNAME = 'IDX_DVL_INFO_REALID') CREATE INDEX IDX_DVL_INFO_REALID ON T_FA_ASSET_DEVALUE_INFO ( FREALCARDID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_ASSET_DEVALUE_INFO' AND KSQL_INDNAME = 'IDX_DVL_INFO_RMASTERID') CREATE INDEX IDX_DVL_INFO_RMASTERID ON T_FA_ASSET_DEVALUE_INFO ( FREALCARDMASTERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_ASSETSPLITENTRY' AND KSQL_INDNAME = 'IDX_FA_SPLITENTRY_REALCARDID') CREATE INDEX IDX_FA_SPLITENTRY_REALCARDID ON T_FA_ASSETSPLITENTRY ( FREALCARDID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_ASSETSPLITENTRY' AND KSQL_INDNAME = 'IDX_FA_SPLITENTRY_REALMASTERID') CREATE INDEX IDX_FA_SPLITENTRY_REALMASTERID ON T_FA_ASSETSPLITENTRY ( FREALCARDMASTERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_CLRBILLENTRY_D' AND KSQL_INDNAME = 'IDX_FA_CLRBILENT_D_REALID') CREATE INDEX IDX_FA_CLRBILENT_D_REALID ON T_FA_CLRBILLENTRY_D ( FREALCARDID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_CLRBILLENTRY_D' AND KSQL_INDNAME = 'IDX_FA_CLRBILENT_D_RMASTERID') CREATE INDEX IDX_FA_CLRBILENT_D_RMASTERID ON T_FA_CLRBILLENTRY_D ( FREALCARDMASTERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_CHANGEFIELDENTRY' AND KSQL_INDNAME = 'IDX_FA_CHGFIELDENTRY_REALID') CREATE INDEX IDX_FA_CHGFIELDENTRY_REALID ON T_FA_CHANGEFIELDENTRY ( FREALCARDID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_CHANGEFIELDENTRY' AND KSQL_INDNAME = 'IDX_FA_CHGFIELDENTRY_RMASTERID') CREATE INDEX IDX_FA_CHGFIELDENTRY_RMASTERID ON T_FA_CHANGEFIELDENTRY ( FREALCARDMASTERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_FA_CARD_FIN' AND KSQL_INDNAME = 'IDX_FA_FINCARD_MASTERID') CREATE INDEX IDX_FA_FINCARD_MASTERID ON T_FA_CARD_FIN ( FREALCARDMASTERID );

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