/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PUR_constraint.sql **/
 EXEC P_ALTERPK 'PK_PUR_INQUIRYTURNS', 'T_PUR_INQUIRYTURNS', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_INQUIRYTURNS_FIDSEQ') CREATE INDEX IDX_PUR_INQUIRYTURNS_FIDSEQ ON T_PUR_INQUIRYTURNS ( FID ,FSEQ );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_INQUIRYTURNS_FTURNS') CREATE INDEX IDX_PUR_INQUIRYTURNS_FTURNS ON T_PUR_INQUIRYTURNS ( FTURNS ,FSUPPLIERID ,FMATERIALID );


 EXEC P_ALTERPK 'PK_PUR_INQUIRYTURNSLOG', 'T_PUR_INQUIRYTURNSLOG', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PUR_INQUIRYTURNSLOG_FID') CREATE INDEX IDX_PUR_INQUIRYTURNSLOG_FID ON T_PUR_INQUIRYTURNSLOG ( FID ,FSEQ );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PUR_constraint.sql **/
