update 中不能使用宏替换的解决方案
下面是我自己的代码,其中&jiaquan_name 是一个宏替换,在这个更新语句中的宏替换没有办法使用,看看有没有办法解决的。谢谢。UPDATE jiaquan SET mat = &jiaquan_name.mat*jiaquan.qty,lab =&jiaquan_name.lab* jiaquan.qty,burden =&jiaquan_name.burden*jiaquan.qty,sub=&jiaquan_name.sub* jiaquan.qty,amt =&jiaquan_name.price*jiaquan.qty,mei ='step4: 第一次更新生产领料、委外发出单价。' ;
from &jiaquan_name WHERE jiaquan.pn =&jiaquan_name.pn AND jiaquan.type in ('生产领料单据','委外加工发出单据') AND (&jiaquan_name.qty>0 AND &jiaquan_name.mat>=0 AND &jiaquan_name.lab>=0 AND &jiaquan_name.burden >=0 AND &jiaquan_name.sub >=0 AND &jiaquan_name.price>=0) AND ISBLANK(jiaquan.mei) AND jiaquan.hs ='是'