# I need to change the query for an update and minus

**URL:** <https://forums.toadworld.com/t/i-need-to-change-the-query-for-an-update-and-minus/42914>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [October 24, 2018, 6:45pm UTC](https://forums.toadworld.com/t/i-need-to-change-the-query-for-an-update-and-minus/42914 "2018-10-24T18:45:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![antoine\_mc1](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@antoine\_mc1](https://forums.toadworld.com/u/antoine_mc1)\
**Post date:** [October 24, 2018, 6:45pm UTC](https://forums.toadworld.com/t/i-need-to-change-the-query-for-an-update-and-minus/42914/1 "2018-10-24T18:45:05Z")

</div>

Hello everyone  
Do you help me please?  
I have the query:  
Ovbiusly this insert is working.  
insert into new5 (c1, c2, c3, c4, c5, c6)  
select p.cvst, p.ctc, cr.lrr, cr.RD, cr.st, cr.ban  
from SCM p  
inner join sthcm cr on cpr.num\_cte = cr.nm\_cs  
where cr.cve =‘9’  
MINUS  
select c1, c2, c3, c4, c5, c6  
from old\_6  
where cve =‘9’;

But I need an UPDATE with MINUS  
I need to change the query for an update

## The example is not working update new5 set (c1, c2, c3, c4, c5, c6) values( select p.cvst, p.ctc, cr.lrr, cr.RD, cr.st, cr.ban from SCM p inner join sthcm cr on cpr.num\_cte = cr.nm\_cs where cr.cve =‘9’ MINUS select c1, c2, c3, c4, c5, c6 from old\_6 where cve =‘9’);

–  
This example is not working.  
update  
(  
values select p.cvst, p.ctc, cr.lrr, cr.RD, cr.st, cr.ban  
from SCM p  
inner join sthcm cr on cpr.num\_cte = cr.nm\_cs  
where cr.cve =‘9’  
MINUS  
select c1, c2, c3, c4, c5, c6  
from old\_6  
where cve =‘9’  
)  
set new5 (c1, c2, c3, c4, c5, c6);

Thank you for your feedback.
