2013年3月5日 星期二

[SQL]將用分號將字串切割,並切換多行


select regexp_substr(mystring,'[^,]+',1,level) element
        from dual
     connect by level <= length(regexp_replace(mystring,'[^,]+')) + 1
Reference:
http://stackoverflow.com/questions/4004377/splitting-comma-separated-string-in-a-pl-sql-stored-proc

沒有留言:

張貼留言