elect case when stdprice=20 then 2 when stdprice=60 then 3 else 0 end ,stdprice,netprice, * –into d_sale_c_bak0203
from u_sale_c where wareid=’194607′ and accdate =’2020-01-22′ and stdprice=2 create table #disable_u_sale_c(id int)
update u_sale_c
set stdprice=case when stdprice=20 then 2 when stdprice=60 then 3 else 0 end,netprice=case when stdprice=20 then 2 when stdprice=60 then 3 else 0 end
from u_sale_c
where wareid=’194607′ and accdate>=’2020-01-22′
drop table #disable_u_sale_c 恢复
select case when stdprice=2 then 20 when stdprice=3 then 60 else 0 end ,stdprice,netprice, * –into d_sale_c_bak0203
from u_sale_c where wareid=’194607′ and accdate =’2020-01-22′ and stdprice=2 create table #disable_u_sale_c(id int)
update u_sale_c
set stdprice=case when stdprice=2 then 20 when stdprice=3 then 60 else 0 end,netprice=case when stdprice=2 then 20 when stdprice=3 then 60 else 0 end
from u_sale_c
where wareid=’194607′ and accdate>=’2020-01-22′
drop table #disable_u_sale_c
|