DBMS_OUTPUT.GET_LINES : dbms_output « System Packages « Oracle PL / SQL

Oracle PL / SQL
1. Aggregate Functions
2. Analytical Functions
3. Char Functions
4. Constraints
5. Conversion Functions
6. Cursor
7. Data Type
8. Date Timezone
9. Hierarchical Query
10. Index
11. Insert Delete Update
12. Large Objects
13. Numeric Math Functions
14. Object Oriented Database
15. PL SQL
16. Regular Expressions
17. Report Column Page
18. Result Set
19. Select Query
20. Sequence
21. SQL Plus
22. Stored Procedure Function
23. Subquery
24. System Packages
25. System Tables Views
26. Table
27. Table Joins
28. Trigger
29. User Previliege
30. View
31. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL / SQL » System Packages » dbms_output 
DBMS_OUTPUT.GET_LINES
   
SQL>
SQL> CREATE TABLE MyTable (
  2    num_col    NUMBER,
  3    char_col   VARCHAR2(60)
  4    );

Table created.

SQL>
SQL>
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
  2    v_Data      DBMS_OUTPUT.CHARARR;
  3    v_NumLines  NUMBER;
  4  BEGIN
  5    DBMS_OUTPUT.ENABLE(1000000);
  6
  7    DBMS_OUTPUT.PUT_LINE('Line One');
  8    DBMS_OUTPUT.PUT_LINE('Line Two');
  9    DBMS_OUTPUT.PUT_LINE('Line Three');
 10
 11    v_NumLines := 3;
 12
 13    DBMS_OUTPUT.GET_LINES(v_Data, v_NumLines);
 14
 15    FOR v_Counter IN 1..v_NumLines LOOP
 16      INSERT INTO MyTable (char_col)
 17        VALUES (v_Data(v_Counter));
 18    END LOOP;
 19  END;
 20  /

PL/SQL procedure successfully completed.

SQL>
SQL> select from MyTable;

   NUM_COL CHAR_COL
---------- ------------------------------------------------------------
           Line One
           Line Two
           Line Three

SQL>
SQL> drop table MyTable;

Table dropped.

SQL>
SQL>

   
    
  
Related examples in the same category
1. Displaying Hello World! to the Screen
2. Call dbms_output.disable
3. Call dbms_output.put_line to display text message
4. dbms_output.enable
5. EXECUTE DBMS_OUTPUT.ENABLE(10000)
6. dbms_output.put: display text without new line sign
7. Call dbms_output.new_line to create a new line
8. Combine text and number in DBMS_OUTPUT.PUT_LINE
9. A small buffer
10. dbms_output.new_line
11. DBMS_OUTPUT.NEW_LINE: a new line sign
12. Use DBMS_OUTPUT.PUT_LINE to output clob data
13. Use DBMS_OUTPUT.PUT_LINE to output the table collection indexed by BINARY_INTEGER
14. This script demonstrates the DBMS_OUTPUT package
15. Output Visual line break
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.