-- 新增索引 顺序为[折旧用途, 核算组织, 业务期间, 结束期间, 资产编码]
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_BIZ_END_PERIOD') CREATE INDEX IDX_FA_BIZ_END_PERIOD ON T_FA_CARD_FIN (FDEPREUSEID, FORG, FBIZPERIODID, FENDPERIODID, FNUMBER);

-- 修改原先的索引,先删除再新增 idx_fa_cf_forgid      FORG, FASSETBOOKID, FENDPERIODID, FNUMBER  -> FORG, FDEPREUSEID, FENDPERIODID, FNUMBER
EXEC p_DropIdx 'IDX_FA_CF_FORGID', 'T_FA_CARD_FIN';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_CF_FORGID') CREATE INDEX IDX_FA_CF_FORGID ON T_FA_CARD_FIN (FORG, FDEPREUSEID, FENDPERIODID, FNUMBER);
