Αποτελέσματα Αναζήτησης
15 Μαρ 2010 · You can do this: UPDATE table1 SET table1.value = (SELECT table2.CODE. FROM table2 . WHERE table1.value = table2.DESC) WHERE table1.UPDATETYPE='blah'
21 Σεπ 2017 · update (select a.category as defaultcategory from a left join b on b.xx_id = a.xx_id left join c on c.zz_id = b.zz_id left join d on d.yy_id = c.yy_id where d.yy_id = ‘123’) dc set dc.defaultcategory = (select kk_id from cc where name = 'NNN') - create table statements for all your tables.
Indicate this by changing their job (JOB) to the null value and their pay (SALARY, BONUS, COMM) values to zero in the EMPLOYEE table. UPDATE EMPLOYEE SET JOB=NULL, SALARY=0, BONUS=0, COMM=0 WHERE WORKDEPT = 'E21' AND JOB <> 'MANAGER'
24 Μαΐ 2017 · Usually, when you need to join multiple tables in an UPDATE, MERGE is the solution. merge into address a1 using ( select p.address_fk, ta2.tempaddress1 from premise p join account ac on (ac.id = p.account_fk) join tempaddresstable ta2 on (ac.ext_ref = ta2.tempextref) ) ta1 on (a1.id = ta1.address_fk) when matched then update set a1.address1 ...
19 Φεβ 2015 · SELECT * FROM PERSON p. INNER JOIN CONTACT on CONTACT.PERSON_ID = p.PERSON_ID. WHERE CONTACT.CURRENT_YEAR_ID = (. SELECT CURRENT_YEAR_ID FROM CURRENT_YEAR WHERE DEFAULT_YEAR = 1. ); Tried another variant : UPDATE CONTACT. SET CONTACT.PHONE = p.PHONE, CONTACT.FAX = p.FAX.
17 Νοε 2013 · I think you need to use a derived table to accomplish this: update order_attributes set value = ( select created_by_name from( select created_by_name, oa.order_id from order_approvals oa left outer join order_attributes ot on oa.order_id = ot.order_id AND OT.ATTRIBUTE_ID = 123 and OT.ORDER_ID in (select ORDER_ID from ORDER_APPROVALS where ...
30 Μαΐ 2011 · From Oracle Database 23ai you can use direct joins in update to copy values from one table to another: