spool to a file with text string concatenation : SPOOL « SQL Plus « 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 » SQL Plus » SPOOL 
spool to a file with text string concatenation
   
SQL>
SQL>
SQL> set heading off
SQL> set feedback off
SQL> set echo off
SQL>
SQL> spool tabsyns.sql
SQL>
SQL> select 'create public synonym ' || table_name ||
  2         ' for ' || table_name || ';'
  3    from user_tables
  4    where rownum < 50;


create public synonym MYTABLE_SESSION for MYTABLE_SESSION;
create public synonym DONE for DONE;
create public synonym EMP_CHANGES for EMP_CHANGES;
create public synonym AQ$_EMP_CHANGES_S for AQ$_EMP_CHANGES_S;
create public synonym AQ$_EMP_CHANGES_T for AQ$_EMP_CHANGES_T;
create public synonym AQ$_EMP_CHANGES_H for AQ$_EMP_CHANGES_H;
create public synonym COMPILE_SCHEMA_TMP for COMPILE_SCHEMA_TMP;
create public synonym TEMP_EMP for TEMP_EMP;
create public synonym UPPER_ENAME for UPPER_ENAME;
create public synonym SYS_IOT_OVER_16251 for SYS_IOT_OVER_16251;
create public synonym AQ$_EMP_CHANGES_G for AQ$_EMP_CHANGES_G;
create public synonym AQ$_EMP_CHANGES_I for AQ$_EMP_CHANGES_I;
create public synonym DEPT_AND_EMP for DEPT_AND_EMP;


create public synonym EMP_REG for EMP_REG;
create public synonym SESS_EVENT for SESS_EVENT;
create public synonym PAGES for PAGES;
SQL>
SQL> spool off
SQL> set echo on
SQL> set heading on
SQL> set feedback on
SQL>
SQL>

SQL>

   
    
  
Related examples in the same category
1. SPOOL query result to a file
2. Spooling files on and off
3. spool to report.txt replace
4. Extracts data from the emp table and writes it to a text file in a comma-delimited format
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.