0

i am using this query

insert into file_status(file_status_sid, client_request_id,date, file_name)
select status_pk_seq.nextinterval, c.client_request_id, sysdate, c.file_name from coverage c;

i always run into

unique constraint client_request_id_unique violated

any ideas how to ignore that ? as coverage table has duplicates client_request_ids

Thanks

ahah ahah
  • 11
  • 1
  • 2
  • Constraints are defined for a reason - to prevent bad data. either clean up the source table, or try adding "distinct" clause. – OldProgrammer Sep 21 '20 at 22:36
  • You need to decide which duplicates you exclude from insert. Once you describe your decision here, we could give you exact sql solution. – Sayan Malakshinov Sep 22 '20 at 00:27

0 Answers0