oracle - ORA-01722 invalid number though types should match -


table1 dwh.fct_nc_crm_dims@etl4

name                        null     type           --------------------------- -------- -------------  ban_key                     not null number(9)      client_name                          varchar2(300)  client_inn                           varchar2(40)   effective_date              not null date           expiration_date                      date    

table2 etl.stg_acrm_ban_attr@etl2

name             null type           ---------------- ---- -------------  segment_crm           varchar2(150)  ban_key               varchar2(32)   

table3 evkuzmin_b2b_churn_ban_segment

name        null type           ----------- ---- -------------  ban_key          number(9)      client_name      varchar2(300)  client_inn       varchar2(40)   segment_crm      varchar2(150)  

my query. here join first 2 tables on ban_key , insert result third table. types match, still error. why?

insert evkuzmin_b2b_churn_ban_segment select a.ban_key, a.client_name, a.client_inn, b.segment_crm from(   select ban_key, client_name, client_inn   from(     select ban_key,client_name, client_inn,        row_number() on (partition ban_key, client_inn order effective_date desc) rn     dwh.fct_nc_crm_dims@etl4      expiration_date >= to_date('01.04.2016','dd.mm.yyyy') or expiration_date null --1st day of reporting period   )   rn = 1 ) a, etl.stg_acrm_ban_attr@etl2 b  a.ban_key = b.ban_key; 

your ban_key in evkuzmin_b2b_churn_ban_segment(table 3) number compare other 2 tables(varchar).

your a.ban_key number , b.ban_key varchar


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -