/**Begin C:\PDM_UPGRADE\PDM1\SRC_constraint.sql **/
 EXEC P_ALTERPK 'PK_SRC_SUPPLIERPICK', 'T_SRC_SUPPLIERPICK', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_SUPPLIERPICK_NUM') CREATE INDEX IDX_SRC_SUPPLIERPICK_NUM ON T_SRC_SUPPLIERPICK ( FNUMBER );


 EXEC P_ALTERPK 'PK_SRC_SUPPLIERPICK_L', 'T_SRC_SUPPLIERPICK_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SUPPLIERPICKFLOW', 'T_SRC_SUPPLIERPICKFLOW', 'FPKID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_SUPPLIERPICKFLOW_BID') CREATE INDEX IDX_SRC_SUPPLIERPICKFLOW_BID ON T_SRC_SUPPLIERPICKFLOW ( FBASEDATAID );


 EXEC P_ALTERPK 'PK_SRC_SUPPLIERPICKTYPE', 'T_SRC_SUPPLIERPICKTYPE', 'FPKID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_SUPPLIERPICKTYPE_BID') CREATE INDEX IDX_SRC_SUPPLIERPICKTYPE_BID ON T_SRC_SUPPLIERPICKTYPE ( FBASEDATAID );


 EXEC P_ALTERPK 'PK_SRC_SUPPLIERPICKORG', 'T_SRC_SUPPLIERPICKORG', 'FPKID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_SUPPLIERPICKORG_BID') CREATE INDEX IDX_SRC_SUPPLIERPICKORG_BID ON T_SRC_SUPPLIERPICKORG ( FBASEDATAID );


 EXEC P_ALTERPK 'PK_SRC_SUPPLIERPICKENTRY', 'T_SRC_SUPPLIERPICKENTRY', 'FENTRYID', '1';

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



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