AI智能
改变未来

子工单开工完工日期与母工单同步 Oracle SQL

转载请注明出处,联系我: t39q@163.com
本人热衷于数据库技术及算法的研究,志同道合之士, 欢迎探讨

update sfb_file t1 set(sfb13,sfb15)=(select sfb13,sfb15 from sfb_file t2 where t1.sfb86=t2.sfb01)where t1.sfb01 in(select sfb01from ( select sfb_file.sfb01,sfb_file.sfb04,sfb_file.sfb13,sfb_file.sfb15,sfb_file.sfb86,a1.sfb13,a1.sfb15,a1.sfb04from sfb_file,( select sfb01,sfb04,sfb13,sfb15 from sfb_filewhere (substr(sfb01,2,3)=\'510\' or substr(sfb01,2,3)=\'516\') and sfb04<>8) a1where substr(sfb_file.sfb01,2,3)=\'512\' and sfb_file.sfb04<>8and sfb_file.sfb86=a1.sfb01 and (sfb_file.sfb13<>a1.sfb13 or sfb_file.sfb15<>a1.sfb15)));
赞(0) 打赏
未经允许不得转载:爱站程序员基地 » 子工单开工完工日期与母工单同步 Oracle SQL