?
Solved

How to export query results in excel using PL/SQL in ORACLE?

Posted on 2014-03-12
3
Medium Priority
?
3,971 Views
Last Modified: 2014-03-13
I am using TOAD and query results are more than toad allows to export.. Is there any alternative?
0
Comment
Question by:CalmSoul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 39925719
may be you can export them into excel in subset of batches by using a where clause accordingly to restrict the record count returned. you can use one of the unique id columns or something of that sort to differentiate the batches right.

Thanks
0
 
LVL 28

Assisted Solution

by:Naveen Kumar
Naveen Kumar earned 1000 total points
ID: 39925721
If you do not want to use toad export functionality at all because of the limitation, then i believe you need to code pl/sql to write into the files in the required formats. you can use utl_file package procedures/functions to write to the OS files.

Thanks,
0
 
LVL 23

Accepted Solution

by:
David earned 1000 total points
ID: 39926260
Are you using TOAD simply to execute the SELECT statement, or perhaps you're adding some manual manipulation?  There may be other factors in play that restrict you.  I often debug by removing any 3rd party product and using SQL*Plus to locate syntax errors.

BTW, the current version of Oracle's (free) SQL*Developer allows a query to be run with certain hints that easily format the result set.  For example, SELECT /*+ CSV */... will forego the need to manually parse all those field delimiters.  HTML, XML, the list goes on.
0

Featured Post

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question