postgresql - Key ... is not present in table ... but it's. (Copy Postgres) -


when try:

copy qe_direito_incidencia 'c:\\temp\\direito_incidencia_04-04-17.txt' delimiter e'\t' null ''; 

i have error:

error: insert or update on table "qe_direito_incidencia" violates foreign key constraint "qe_direito_incidencia_cod_empresa_fkey" sql state: 23503 detail: key (cod_empresa, cod_direito)=(1, 78) not present in table "qe_direito". 

but have record in 2 tables, qe_direito , qe_direito_incidencia.

any idea?

thanks!

i've solved. needed change export excel csv. when try export txt, doesn't work , report error above.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -