MYSQL Split Delimited Strings Functions

by Preetha 2012-09-14 09:48:11

CREATE FUNCTION strSplit(
x varchar(255),
delim varchar(12),
pos int
)
returns varchar(255)
return replace(substring(
substring_index(x, delim, pos),
length(substring_index(x, delim, pos - 1)) + 1),
delim, '');

Tagged in:

447
like
0
dislike
0
mail
flag

You must LOGIN to add comments