create table migrate_users as select ru.id, trim(ru.login) email, upper(trim(regexp_replace(dd.name, E'[\\n\\r\\t. ]+', ' ', 'g')))  district_name , rp.name first_name , rp.dob
                from res_users ru
                full outer join district_district dd on ru.location_id  = dd.id
                join res_partner rp on ru.partner_id  = rp.id;