บางครั้งเราอาจเจอโจทย์ที่ต้องแยก String ออกเป็นหลายๆ rows ครับ
SELECT trim(regexp_substr('String1,String2,String3', '[^,]+', 1, LEVEL)) str_2_tab
FROM dual
CONNECT BY LEVEL <= regexp_count('String1,String2,String3', ',')+1
thank you : http://stackoverflow.com/questions/14328621/oracle-10g-splitting-string-into-multiple-rows

ไม่มีความคิดเห็น:
แสดงความคิดเห็น