Unable to produce results, though mysql codes can produce results.
Hi I have trouble running my stored procedure.
Here's my stored procedure in codes:
mysql> show create procedure list_dates;
+------------+-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Procedure | sql_mode | Create Procedure |
+------------+-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| list_dates | STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER | CREATE DEFINER=`root`@`localhost` PROCEDURE `list_dates`(IN batchcode VARCHAR(10), IN mfgnum varchar(24))
BEGIN
select distinct(date(tested)) from test where batch = "batchcode" and mfg_code = "mfgnum";
END |
+------------+-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
It has no errors during the creation of stored procedure.
When I run 'call list_dates(0000050004, "BC-7A1-5")', it returns nothing.
So if I run like 'select distinct(date(tested)) from test where batch = "0000050004" and mfg_code = "BC-7A1-5";'. It returns the result.
Any idea?
Clement Yap
Subject
Views
Written By
Posted
Unable to produce results, though mysql codes can produce results.
1835
November 12, 2013 09:34PM
811
November 13, 2013 08:48PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.