Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Articles Thread, Oracle HTML output Tutorial in Oracle; Oracle HTML output Tutorial Step 1 - HTML output from sqlPlus Oracle HTML output Oracle is a very feature rich ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=6975


Reply
LinkBack Thread Tools Display Modes
Oracle HTML output Tutorial
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
04-12-2008, 02:25 AM
 
Oracle HTML output Tutorial

Step 1 - HTML output from sqlPlus

Oracle HTML output
Oracle is a very feature rich high end database, however sqlPlus is one of it's weakness. Time to time it you need to list the content of a table or view in Oracle using sqlPlus and it usually results a hard interpretable output. There is the possibility to set line size parameter and modify the display size of the columns but it takes to much time.
I nice solution would be to display the output in a HTML format. Fortunately we can do that. Now I will show you 2 solutions. The first one is working from the command line and the second one is working inside sqlPLus.
1. Generate Oracle HTML output from command line:
Code:
  1. sqlplus -S -M "HTML ON TABLE 'BORDER="2"'" user/password @test.sql>test.html
Database F1

In this example you need to create the test.sql file and put all your sql statements in this file. The result will be written into the test.html file.
2. Generate Oracle HTML output inside sqlPlus:
Code:
  1. SET markup HTML on
  2. spool test.html
  3. SELECT * FROM mytable;
  4. spool off
  5. SET markup HTML off
Database F1

In this case you can write all of your sql statements between the spool commands. The test.html file will be generated in the actual directory.
As you can see these solutions are not the best as you can view the files in a browser and not in sqlPlus, however in a lot of cases this solution makes your life easier.

__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
Reply

Articles Thread, Oracle HTML output Tutorial in Oracle; Oracle HTML output Tutorial Step 1 - HTML output from sqlPlus Oracle HTML output Oracle is a very feature rich ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=6975


Bookmarks

Tags
html, oracle, output, tutorial


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle/Java Tutorial Developer Articles 2 11-03-2009 04:07 PM
Oracle DBA FAQ - Loading and Exporting Data Tutorial Developer Articles 0 04-12-2008 02:36 AM
Oracle PL/SQL Tutorial Developer Articles 0 04-12-2008 02:09 AM
Oracle Procedures Send Email Tutorial Developer Articles 0 04-12-2008 02:06 AM
Lesson : HTML Linking to E-Mail in HTML Tutorial Developer Articles 0 17-10-2008 09:14 PM