/**Begin C:\PDM_UPGRADE\PDM1\SRM_constraint.sql **/
 EXEC P_ALTERPK 'PK_SRM_EVAPLAN', 'T_SRM_EVAPLAN', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRM_EVAPLAN_FBILLDATE') CREATE INDEX IDX_SRM_EVAPLAN_FBILLDATE ON T_SRM_EVAPLAN ( FBILLDATE );


 EXEC P_ALTERPK 'PK_SRM_EVAPLAN_A', 'T_SRM_EVAPLAN_A', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRM_EVAPLAN_A_FTIME') CREATE INDEX IDX_SRM_EVAPLAN_A_FTIME ON T_SRM_EVAPLAN_A ( FCREATETIME );


 EXEC P_ALTERPK 'PK_SRM_EVAPLAN_L', 'T_SRM_EVAPLAN_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRM_EVAPLAN_L_FID') CREATE INDEX IDX_SRM_EVAPLAN_L_FID ON T_SRM_EVAPLAN_L ( FLOCALEID );


 EXEC P_ALTERPK 'PK_SRM_EVASCORERENTRY', 'T_SRM_EVASCORERENTRY', 'FDETAILID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRM_EVASCORERENTRY_FID') CREATE INDEX IDX_SRM_EVASCORERENTRY_FID ON T_SRM_EVASCORERENTRY ( FSEQ );


 EXEC P_ALTERPK 'PK_SRM_EVAPLANENTRY', 'T_SRM_EVAPLANENTRY', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRM_EVAPLANSUP_FSUPPLIERID') CREATE INDEX IDX_SRM_EVAPLANSUP_FSUPPLIERID ON T_SRM_EVAPLANENTRY ( FSUPPLIERID );



/**End C:\PDM_UPGRADE\PDM1\SRM_constraint.sql **/
