Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Automation of SQL result set export

3556676Sep 27 2017 — edited Oct 3 2017

Hi,

I will try to explain my problem with example.

I have multiple sql-queries

Query-1

-----------

Select a, b, c, d From Table1;

Query-2

-----------

Select a, b, x, y From Table2;

Query-3

-----------

Select m, n, o, p From Table3;

Query-4

-----------

Select g, h, i, j From Table4;

Requirement

-----------------

I want to save/export the query results of each query in different text file (for example result set of query-1 in ABC.txt, result set of query-2 in XYZ.txt).

The format of exported data should be as shown below (Please check Format, Delimeter, encoding, etc)

pastedImage_0.png

I want to automate this thing, as I have may such sql queries and I have to do it for 700 projects(sql databases). I have tried something like "spool", but not able to export the data in required format.

Please help me, as it's very urgent.

Best Regards,

Priyank

This post has been answered by thatJeffSmith-Oracle on Oct 3 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2017
Added on Sep 27 2017
15 comments
2,589 views