Tách Chuỗi Thành Mảng Trong Oracle - Go Ahead

Skip to content Posted on 3 March, 2015 by ThaiPH Posted in CodingTagged Coding, oracle

/* Formatted on 3/4/2015 12:32:08 AM (QP5 v5.126) */ DECLARE l_input VARCHAR2 (4000) := ‘1,2,3’; l_count BINARY_INTEGER; l_array DBMS_UTILITY.lname_array; BEGIN SELECT param_value INTO l_input FROM item_param_detail WHERE param_value LIKE ‘TO%,%’;

DBMS_UTILITY.comma_to_table ( list => REGEXP_REPLACE (l_input, ‘(^|,)’, ‘\1x’), tablen => l_count, tab => l_array); DBMS_OUTPUT.put_line (l_count);

FOR i IN 1 .. l_count LOOP DBMS_OUTPUT.put_line( ‘Element ‘ || TO_CHAR (i) || ‘ of array contains: ‘ || SUBSTR (l_array (i), 2)); END LOOP; END;

Share this:

  • Facebook
  • Email
  • Print
  • Twitter
Like Loading...

Related

Leave a comment Cancel reply

Δ

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation

SếpChủ nhật Search for: Social
  • View phi.thai’s profile on Facebook
  • View thaimeo’s profile on Twitter
  • View phihongthai’s profile on Instagram
  • View thaiph’s profile on Pinterest
  • View phihongthai’s profile on LinkedIn
  • View hongthaiphi’s profile on GitHub
  • View phihongthai’s profile on YouTube
Follow Go Ahead on WordPress.com The Big Day1 December, 2016The big day is here.Recent Comments
ThaiPH on Chủ nghĩa tiêu dùng là không…
Huyen Nguyen on Chủ nghĩa tiêu dùng là không…
GiaĐịnh on Phân tích về chiến tranh biên…
ThaiPH on Những điều tiêu cực không nên…
Bà Tám on Những điều tiêu cực không nên…
Blog Stats
  • 156,922 hits
Bookmarks
  • Blog Misao
  • CayHoa.com
  • Chuyen Vinh Phuc Forum
  • Phùng Huy sứt
  • say Linux!
  • Tú béo
  • VinaCode – Lập trình & Cuộc sống
March 2015
M T W T F S S
1
2345678
9101112131415
16171819202122
23242526272829
3031
« Feb Apr » Instagram

No Instagram images were found.

  • Comment
  • Reblog
  • Subscribe Subscribed
    • Go Ahead
    • Join 57 other subscribers Sign me up
    • Already have a WordPress.com account? Log in now.
    • Go Ahead
    • Customize
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
%d Design a site like this with WordPress.comGet started

Từ khóa » Tách Chuỗi Trong Oracle