Skip to Main Content

SQL & PL/SQL

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!

Table output in multiple flat files base on country iso code

Saaz EnaJun 20 2016 — edited Jun 23 2016

Hello All,

I am using Oracle 11g and trying to output my table data in multiple flat files base on country iso code records. As the data is huge I cannot use spool command. Could some one please help me out with UTL command.

Table as below with sample data

Create table list_country

(

iso_code char(3),

country_name varchar2(20),

Region_id varchar2(10),

Region_Name varchar(20)

);

insert into list_country VALUES ('BEL', 'Belgium', 'R1', 'Flemish');

insert into list_country VALUES ('BEL', 'Belgium', 'R2', 'Flanders');

insert into list_country VALUES ('BEL', 'Belgium', 'R3', 'Walloon');

insert into list_country VALUES ('BEL', 'Belgium', 'R4', 'Brussels');

insert into list_country VALUES ('EST', 'Estonia', 'R1', 'Tallinn');

insert into list_country VALUES ('EST', 'Estonia', 'R2', 'Narva');

insert into list_country VALUES ('GIN', 'Guinea', 'R1', 'Kindia');

insert into list_country VALUES ('GIN', 'Guinea', 'R2', 'Conakry');

insert into list_country VALUES ('GIN', 'Guinea', 'R3', 'Camayenne');

tabledata.jpg

Thanks in Advance and Regards

Saaz

This post has been answered by Manik on Jun 20 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2016
Added on Jun 20 2016
23 comments
747 views