create table temp_udl
( 
    udl_company_id                integer not null,
    udl_id                        integer ,
    udl_name                      varchar(200) not null,
    udl_container_id              integer not null,
    udl_container_type            varchar(128) not null,
    udl_description               varchar(3000),
    udl_running_log               char,
    udl_table_name                varchar(128),
    primary key (udl_company_id, udl_container_type, udl_container_id, udl_name)
) 
in users index in indx;


insert into temp_udl
select udl_company_id, udl_id, udl_name, udl_container_id, udl_container_type, udl_description, udl_running_log, udl_table_name
from udl group by
udl_company_id, udl_id, udl_name, udl_container_id, udl_container_type, udl_description, udl_running_log, udl_table_name;

drop table tctg_udl_user_defined_logs;

rename temp_udl to tctg_udl_user_defined_logs;
