473,378 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Bulk copy to text file in Oracle

3
Hi friends

How to bulk copy the output of a query to textfile in PL/SQL


Thanks

Manoop
Oct 24 '07 #1
4 4884
amitpatel66
2,367 Expert 2GB
Hi friends

How to bulk copy the output of a query to textfile in PL/SQL


Thanks

Manoop
You can make use of UTL_FILE package for writing data to text file using PLSQL.
Oct 24 '07 #2
manoop
3
You can make use of UTL_FILE package for writing data to text file using PLSQL.

We want the output in a comma seperated format.
Oct 24 '07 #3
debasisdas
8,127 Expert 4TB
We want the output in a comma seperated format.
then try to use the SPOOL command.
Oct 24 '07 #4
amitpatel66
2,367 Expert 2GB
You can make use of UTL_FILE package for writing data to text file using PLSQL.
You can also try this:

Have a cursor that selects the data from the table in the format:
CURSOR C1 IS SELECT empno||','||ename from emp;
LOOP through the cursor and write the data using UTL_FILE record by record.

or

Use SPOOL command as suggested in above post
Oct 25 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Kiran Dalvi | last post by:
Hi, Does anybody know how to update Bulk Data into Oracle Database, efficiently ? {e.g. 1000+ rows in a table need to modified / Added, with Data coming in the form of a XML File.} Please...
3
by: Jim Geissman | last post by:
I am trying to bulk insert a text file. The file has fixed-length fields with no field terminators. BOL says that field terminators are only needed when the data does *not* contain fixed-length...
2
by: Niraj | last post by:
Hi, I am trying to do bulk insert of binary data (array of bytes) in an Oracle table. The data type of the table is BLOB. I am using Oracle Objects for OLE (OO4O) in C++. The binary data that I...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
3
by: Tim Satterwhite | last post by:
Hi All, I think this is a thorny problem, and I'm hoping you can help. I've not found this exact issue described anywhere yet. I have a stored procedure that calls BULK INSERT on a set of...
0
by: tezza98 | last post by:
HI i am using BULK INSERT to copy data from a text file into a table that already exists BULK INSERT dbo.TRANStemp FROM 'D:\MSSQL\Data\TRANS.csv' WHERE dbo.TRANStemp.DateTime <> ...
2
by: mivey4 | last post by:
Hi, I have been searching but haven't had any luck finding a method of performing bulk inserts of data into Oracle comparable to using the BCP utility with MSSQL. In our MSSQL environment I...
5
by: yeoj13 | last post by:
Hello, I have a db2load script I'm using to populate a large table. Ideally, my target table is required to have "Not Null" constraints on a number of different columns. I've noticed a ...
4
by: alpareshamwala | last post by:
Hi Friends, i wanted to bulk copy an MS Excel file to Oracle Database the way "bcp" is used in MS Sql Server. pl. help ASAP Alpa
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.