MySQL Forums
Forum List  »  Stored Procedures

Sending string as param to sproc
Posted by: Russel James
Date: November 26, 2015 06:00AM

Hi, I have a stored proc as follows:

CREATE DEFINER=`root`@`localhost` PROCEDURE `usp_FactoryList`(
IN p_productIDList varchar(100),

)
BEGIN
SELECT * FROM factory
WHERE factory.productID IN p_productIDList
order by productID, comment;

END

Im sending in a parameter called p_productIDList which is a String of Product ID's. ie "(ID1, ID2, ID3)"

Except I am getting a syntax error "unexpected 'productIDList' (identifier)"

Can this be done ?

J

Options: ReplyQuote


Subject
Views
Written By
Posted
Sending string as param to sproc
2087
November 26, 2015 06:00AM
680
November 26, 2015 12:23PM


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.