/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FA_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_FA_INVDIFFERERENTRY', 'T_FA_INVDIFFERERENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_FA_INVDIFFER', 'T_FA_INVDIFFER', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_INVENTORY_BILLNO') CREATE INDEX IDX_FA_INVENTORY_BILLNO ON T_FA_INVDIFFER ( FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_INVENTORY_FORGID') CREATE INDEX IDX_FA_INVENTORY_FORGID ON T_FA_INVDIFFER ( FORGID ,FINVENTSCHEMEID );


 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_CF_FASSETCAT') CREATE INDEX IDX_FA_CF_FASSETCAT ON T_FA_CARD_FIN ( FASSETCATID ,FORG ,FENDPERIODID );


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