Bug #7753 A SPLIT function in MySQL?!?

Submitted: 9 Jan 2005 20:57 Modified: 21 Feb 2006 12:49
Reporter: Are you mortal Then prepare to die. Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S4 (Feature request)
Version:next OS:Any (all)
Assigned to: CPU Architecture:Any

[9 Jan 2005 20:57] Are you mortal Then prepare to die.
Description:
It would be really great if there were a SPLIT function in MySQL (kind of a 'mirror' function to the GROUP_CONCAT function).

The split would generate one row per 'chunk' of data split.

For example,

1) Example data

select * from T1;
x y
a 1
a 2
a 3
b 1
b 2
b 3

2) Show existing function (4.1 or UDF)

create T2 select x, group_concat(y,":") as z from T1;

select * from T2
x z
a 1:2:3
b 1:2:3

3) How new SPLIT function should work

select x, split(z, ":") as y_again from T2;

x y_again
a 1
a 2
a 3
b 1
b 2
b 3

This would be really cool (and not too hard?)

How to repeat:
Think 'mirror function'

Suggested fix:
Design a UDF or implement a new function.
[21 Feb 2006 11:18] Valeriy Kravchuk
Thank you for a feature request. Yes, it will be "cool" to have a function like this, but you can write the UDF yourself if it is really needed for your applications. I am not sure that it will be added as a builtin function in any foreseeable future, though.
[21 Feb 2006 12:49] Are you mortal Then prepare to die.
Where is the MySQL UDF Community page?

I think MySQL should try to centralise the UDF developers of the world in a 'non official' set of pages (or at least a mailing list). Please do this now. I don't want to write a UDF until I know that it will reach the maximum possible number of people via a centralised UDF repo.

MyPan?
[29 Apr 2006 16:05] Sergei Golubchik
Not MyPan but MySQLForge, but you're right about the rest.
http://forge.mysql.com/projects/

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
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.