本文介绍了存储过程中的组和总和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Experts,



我真的想要快速帮助以下存储过程......

我的SP工作得非常好。

Hello Experts,

I really want a quick help for the below stored procedure...
My SP works absolutely fine.

DELIMITER $$

DROP PROCEDURE IF EXISTS `spm_itemlocations` $$
CREATE DEFINER=`mysqluser`@`%` PROCEDURE `spm_itemlocations`(tLoc   character(4),
  tItem  character(21),
  tTLine character(52))
BEGIN
set tItem = concat(tItem, '%');

  select icitem, icdsc1, icdsc2, ifloc, ifqoh, ifqcm
  from TESTDATA.VINITMB
  join TESTDATA.VINITEM on icitem = ifitem
  where ifcomp = 1
  and ifdel = 'A'
  and (tLoc = '' or tLoc = ifloc)
  and ifqoh = 0
  and (tItem = '' or icitem like tItem)
  and UCASE(ictrln) like tTLine

  order by ifloc, ifitem;

end $$

DELIMITER ;







当有人说请分组并使用摘要,其中sum(ifqoh)= 0将包括在此内。



这是什么意思?我应该在哪里汇总和分组?



有人可以帮我这个吗?




When someone says "Please group and use a summary where sum(ifqoh) = 0 to be included in this."

What does that mean? where should I sum and group ?

Can someone help me with this please?

推荐答案









当有人说请分组并使用摘要,其中sum(ifqoh)= 0将包含在此内。



这是什么意思?我应该在哪里汇总和分组?



有人可以帮帮我吗?




When someone says "Please group and use a summary where sum(ifqoh) = 0 to be included in this."

What does that mean? where should I sum and group ?

Can someone help me with this please?


这篇关于存储过程中的组和总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 02:29