Possible Duplicate:
Can Mysql Split a column?
I am going to pass a comma separated string consisting of filter parameters from my java code to my mysql
stored procedure. This will be fetched by one of the IN
parameters of the procedure.
I want to split this comma separated string into separate variables and use them in different queries.
On googling I found this MySQL substring function
But there is a problem with it:
mysql> SELECT SUBSTRING_INDEX('www.mysql.com', '.', 2);
-> 'www.mysql'
But I want www
,mysql
,com
for which there is no provision to get the sub-string from 1st delimeter to the next one and so on...