0
|
runnerLv7资深互助发布于2023-7-26 18:04(编辑于 2023-7-26 18:10)
|
往出粘贴一下sql 参数加个引号看一下 ='${month}'
|
-
yzmzx5HM9312217(提问者)
- select HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.bill_year || \'-\' ||
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.bill_month,
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.plan_type,
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.version,
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTHGC.factory,
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTHGC.matcode,
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTHGC.matname,
sum(nvl(qty, 0))
from HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH
left join HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTHGC
on HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.id =
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTHGC.mainid
where HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.bill_year || \'-\' ||
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.bill_month =${month}
and HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.plan_type = ${plan_type}
and HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.version =${version}
group by HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.bill_year || \'-\' ||
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.bill_month,
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.plan_type,
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTH.version,
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTHGC.factory,
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTHGC.matcode,
HBPRODUCTIONCOMMAND.PLA_WORKPLAN_MONTHGC.matname
|
|