我指的是在ACCESS中实现乘积,例如以下这A列变成B列
发布网友
发布时间:2023-06-25 04:27
我来回答
共1个回答
热心网友
时间:2024-12-13 06:06
原表叫test,数据如下:
执行语句:
select s1.a,switch(s1.a*s2.b is null,1,true,s1.a*s2.b) as b from test as s1 left join
(select t1.a,switch(t1.a*t2.b is null,1,true,t1.a*t2.b) as b from test as t1 left join
(select a.a,switch(a.a*b.a is null,1,true,a.a*b.a) as b from test as a left join test as b on a.a=b.a+1) as t2
on t1.a=t2.a+1) as s2 on s1.a=s2.a+1
查询结果: