
EXEC P_ALTERPK 'PK_PMTS_CALSYSPARAM', 'T_PMTS_CALSYSPARAM', 'FID', '1';

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

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_CALSYSAM_CTIME') CREATE INDEX IDX_PMTS_CALSYSAM_CTIME ON T_PMTS_CALSYSPARAM( FCREATETIME );


EXEC P_ALTERPK 'PK_PMTS_CALSYSPARAM_L', 'T_PMTS_CALSYSPARAM_L', 'FPKID', '1';

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

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PMTS_CALSYSAM_L_NAME') CREATE INDEX IDX_PMTS_CALSYSAM_L_NAME ON T_PMTS_CALSYSPARAM_L( FNAME );