I have Some static data for that i am creating select statement with the help of union all and i am comparing those data with DB table (departments).. with the help of minus i will get extra records which are in DB table and i need to delete those record......Need to sync up existing records with static data i hope this will clear the requirement..
Trying to delete a resultSet of select query in below query i am not sure where is my mistake.. getting SQL Error: ORA-01732: data manipulation operation not legal on this view 01732. 00000 - "data manipulation operation not legal on this view"
Here i am trying to delete all the records from departments which are not matched with 66,77
delete from (select department_id, department_name, manager_id,location_id from departments
minus
(select 66,'Administration',200,1700 from dual
union all
select 77,'Marketing',201,1800 from dual));