/**Begin D:\PDM_UPGRADE\PDM1\FA_constraint.sql **/
EXEC P_ALTERPK 'PK_T_FA_MERGEBILL', 'T_FA_MERGEBILL', 'FID', '1';

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

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_MERGEBILL_ORG') CREATE INDEX IDX_FA_MERGEBILL_ORG ON T_FA_MERGEBILL ( FORGID ,FMERGEDATE );


EXEC P_ALTERPK 'PK_T_FA_MERGE_IN', 'T_FA_MERGE_IN', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FA_MERGE_OUT', 'T_FA_MERGE_OUT', 'FDETAILID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_MERGE_OUT') CREATE INDEX IDX_FA_MERGE_OUT ON T_FA_MERGE_OUT ( FENTRYID );



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