/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BEI_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BEI_TRANSTYPE', 'T_BEI_TRANSTYPE', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_TRANSTYPE') CREATE  CLUSTERED INDEX IDX_BEI_TRANSTYPE ON T_BEI_TRANSTYPE ( FISPRESETDATA );


 EXEC P_ALTERPK 'PK_T_BEI_TRANSTYPE_L', 'T_BEI_TRANSTYPE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_TRANSTYPE_L') CREATE INDEX IDX_BEI_TRANSTYPE_L ON T_BEI_TRANSTYPE_L ( FNAME ,FCOMMENT ,FID );


 EXEC P_ALTERPK 'PK_T_BEI_TRANSTYPECURRENCY', 'T_BEI_TRANSTYPECURRENCY', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BEI_TRANSTYPEFINORG', 'T_BEI_TRANSTYPEFINORG', 'FPKID', '1';

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



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