注册

sql的参数化查询的问题。

雅彦 2025/08/22 194 1
select MONTH(reportDate) as month,sum(case when b.type > 0 then weight end)/1000.0 as oil_quantity1, sum(case when b.type = 0 then weight end)/1000.0 as oil_quantity2 from dayOilSale a,oilCode b where a.stationId=@0 and a.reportDate>=@1 and a.reportDate<@2 and a.oilCode=b.oilCode and MONTH(reportDate) in (select month from sales_kanban_list where kanbanStationId=@3 and kanbanYear=@4 and oil_quantity1=0) group by MONTH(reportDate) -- PARAMETERS: ["33153307","2025-01-01","2026-01-01","33153307",2025]

用的nodejs 的 dmdb 驱动,提示“参数个数不匹配”

回答 0
暂无回答
扫一扫
联系客服