/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PUR_constraint.sql **/
 EXEC P_ALTERPK 'PK_PUR_INVOICEDETAIL_ATT', 'T_PUR_INVOICEDETAIL_ATT', 'FPKID', '1';

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

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


 EXEC P_ALTERPK 'PK_PUR_INVOICEDETAIL', 'T_PUR_INVOICEDETAIL', 'FENTRYID', '1';

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



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