EXEC P_ALTERPK 'PK_BOTP_CONVERTPATH_PARAM', 'T_BOTP_CONVERTPATH_PARAM', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BOTP_CP_PARAM_BILLNUM') CREATE UNIQUE INDEX IDX_BOTP_CP_PARAM_BILLNUM ON T_BOTP_CONVERTPATH_PARAM ( FSOURCEBILLNUMBER ,FTARGETBILLNUMBER );

EXEC P_ALTERPK 'PK_BOTP_CONVERTPATH_PARAM_L', 'T_BOTP_CONVERTPATH_PARAM_L', 'FPKID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BOTP_CP_PARAM_L_FID') CREATE INDEX IDX_BOTP_CP_PARAM_L_FID ON T_BOTP_CONVERTPATH_PARAM_L ( FID ,FLOCALEID );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BOTP_CP_PARAM_L_FNAME') CREATE INDEX IDX_BOTP_CP_PARAM_L_FNAME ON T_BOTP_CONVERTPATH_PARAM_L ( FNAME );

