EXEC P_ALTERPK 'PK_ER_INVOICETYPE', 'T_ER_INVOICETYPE', 'FID', '1';

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


EXEC P_ALTERPK 'PK_T_ER_INVOICETYPE_L', 'T_ER_INVOICETYPE_L', 'FPKID', '1';

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