DELIMITER $$
DROP PROCEDURE IF EXISTS
`ufdc_sales`.`depot_stack_register3_7_2` $$
CREATE DEFINER=`root`@`%` PROCEDURE `enter code here`
`depot_stack_register3_7_2`( IN stackId BIGINT,IN speciesId
BIGINT,IN fromdate DATE,IN todate DATE)
BEGIN
set @mysql='select sdt.depot_lot_no
from stack st , stock_detail_trans sdt
where sdt.stack_id=st.id
SET @mysql = @mysql+' AND st.SPECIES_ID='+1;
END $$
DELIMITER ;
附加错误。我想知道如何添加此查询。