Re: Inseret records from one table to many
> it insert the category only and not the parent_category
That's exactly what ...
INSERT INTO t_category (category)
SELECT category from t_csv where category NOT IN (select category from t_category
... says to do.
If you want also to insert t_cv.parent_category, you need something like ...
insert into t_category (category, parent_category)
select category, parent_category
from t_csv
where category not in (select category from t_category)
Subject
Views
Written By
Posted
905
March 23, 2017 06:37AM
Re: Inseret records from one table to many
616
March 23, 2017 11:24AM
550
March 23, 2017 12:37PM
749
March 23, 2017 01:18PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.