sql - How to update a field in the same table -


i need update field same table. in example below rewrate set correct in co 1 , need updated newrate co 4, 10 , 16. based on edl type, edl code. thanks

enter image description here

this code wrong, not know how fix it. sorry

  update       prci    set   newrate = (select newrate prci  prci.prco=1 , craft ='xxx') 

sorry confusing. need update edl code300 newrate 0.05, edl code700 newrate 5.3 edl code701 newrate 3.7 edl code707 newrate 0.78 edl code714 newrate 3

for company 4 10 , 16

there go.

update t1  set t1.newrate=t2.newrate prci t1  inner join prci t2 on t1.edltype=t2.edltype , t1.edlcode=t2.edlcode t1.prco!='1'; 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -