问题描述
选择tblBias_TP_RCU_AB.[主要有效成分],Sum(IIf([范围内] ="X",1,0))/Sum(IIf([材料] ="X",1,0)) AS MAPE,tblBias_TP_RCU_AB.ChartDate INTO tmpBias_AI_TA_AB
来自tblBias_TP_RCU_AB
在哪里(((((tblBias_TP_RCU_AB.Material)="X")))
GROUP BY tblBias_TP_RCU_AB.[主要有效成分],tblBias_TP_RCU_AB.ChartDate
拥有(((((tblBias_TP_RCU_AB.ChartDate)> DateAdd("m",-25,[Forms]![frmSwitch]![Today])))
ORDER BY tblBias_TP_RCU_AB.[主要有效成分],tblBias_TP_RCU_AB.ChartDate DESC;
SELECT tblBias_TP_RCU_AB.[Primary Active Ingredient], Sum(IIf([In Range]="X",1,0))/Sum(IIf([Material]="X",1,0)) AS MAPE, tblBias_TP_RCU_AB.ChartDate INTO tmpBias_AI_TA_AB
FROM tblBias_TP_RCU_AB
WHERE (((tblBias_TP_RCU_AB.Material)="X"))
GROUP BY tblBias_TP_RCU_AB.[Primary Active Ingredient], tblBias_TP_RCU_AB.ChartDate
HAVING (((tblBias_TP_RCU_AB.ChartDate)>DateAdd("m",-25,[Forms]![frmSwitch]![Today])))
ORDER BY tblBias_TP_RCU_AB.[Primary Active Ingredient], tblBias_TP_RCU_AB.ChartDate DESC;
推荐答案
这篇关于将此ms访问代码转换为ms sql代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!