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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_DATA_ASSET_ORB') CREATE INDEX IDX_FA_DATA_ASSET_ORB ON T_FA_DATA_ASSET ( FORGID ,FBILLNO ,FREGISTDATE ,FBILLSTATUS );


EXEC P_ALTERPK 'PK_T_FA_DATA_ASSET_L', 'T_FA_DATA_ASSET_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_DATA_ASSET_L') CREATE INDEX IDX_FA_DATA_ASSET_L ON T_FA_DATA_ASSET_L ( FID ,FLOCALEID );


EXEC P_ALTERPK 'PK_T_FA_DATA_DETAIL', 'T_FA_DATA_DETAIL', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FA_DATA_DETAIL_L', 'T_FA_DATA_DETAIL_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_DATA_DETAIL_L') CREATE INDEX IDX_FA_DATA_DETAIL_L ON T_FA_DATA_DETAIL_L ( FENTRYID ,FLOCALEID );

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