I want to insert data into multiple tables from one query/input dataset while fetching different data with a where clause. I am using Oracle SQL Developer.
I already trid below logic which won't work:
Insert into A (X, Y, Z)
Values(Select x, y, z From inputdata where x = 1)
Insert into B (X, Y, Z)
Values(Select x, y, z From inputdata where x = 2)
Insert into C (X, Y, Z)
Values(Select x, y, z From inputdata where x = 3)
With inputdata as (Select x, y, z From source)
Select x, y, z From inputdata
Use conditional
insert alllike here: