 EXEC P_ALTERPK 'PK_T_BD_DMTP', 'T_BD_DMTP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_DMTP_FNUMBER') CREATE INDEX IDX_BD_DMTP_FNUMBER ON T_BD_DMTP ( FNUMBER ,FCREATEORGID );


 EXEC P_ALTERPK 'PK_T_BD_DMTP_L', 'T_BD_DMTP_L', 'FPKID', '1';

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


