Re: Sending string as param to sproc
See the manual page for PREPARE. The sproc needs to say something like ...
set @sql = concat( "select * from factory where productid in(", productidlist, ") order by productid, comment" );
prepare stmt from @sql;
execute stmt;
drop prepare stmt;
If productID isn't a numeric, the list items will need to be single-quoted.
Subject
Views
Written By
Posted
2318
November 26, 2015 06:00AM
Re: Sending string as param to sproc
768
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.