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 ;
Please group and use a summary where sum(ifqoh) = 0 to be included in this.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)