Mysql Call Stored procedure from another stored procedure

MySQLsqlstored-procedures

I am sorry for the incomplete information.
Here's my two sp's:
SP1 –

DELIMITER $$

DROP PROCEDURE IF EXISTS SP1 $$ CREATE PROCEDURE
SP1(InputCustomerID int, InputOrderID int) BEGIN

// Some sql statements and finally put it into the actual table tb1 in
the database

END $$

DELIMITER ;

SP2 – In SP2 i am assigning input value of SP1's params.

DELIMITER $$

DROP PROCEDURE IF EXISTS SP2 $$ CREATE PROCEDURE SP2() BEGIN

Declare InputCustomerID int; Declare InputOrderID int; Declare
OrderStateDate Datetime;

Select CustomerID into InputCustomerID From Cusomers Where
CustomerID NOT IN (Select FK_CustomerID From CustomerOrders) and
IsApproved = True and CustomerID IN
(Select FK_CustomerID From CustomerProductOrders
Where Date (OrderStartDate) = Date(Now()));

Select OrderID into InputOrderID From CustomerOrders Where
FK_CustomerID NOT IN (Select FK_CustomerID From CustomerProdcutOrders)
and IsApproved = True and Date(OrderStartDate) = Date(Now());

Call SP1(InputCustomerID, InputOrderID);

END $$

DELIMITER ;

Best Answer

Your question is very poorly worded, and it makes given a good answer very hard.

For example, I gather you must be calling sp2, which calls sp1. Anything else would make it impossible to feed sp1 the parameters.

You go on to say that sp2 doesn't have any input or output parameters. With no output parameters, I can't understand how you're expecting to see output from sp2.

I'm sure that, "You're not getting output because you didn't setup any output," is not the answer you wanted. You should edit your question, perhaps with some example code.