Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Dharavath.

Asked: May 24, 2018 - 5:37 am UTC

Last updated: June 28, 2018 - 6:05 am UTC

Version: 10g

Viewed 1000+ times

You Asked

Hello,

My requirement is to
1. Read two query result and write into two different CSV files
2. Zip these two CSV files in a single zip file.

There is a similar qn posted that tells who to create csv file and store the result (clob and blob) in a table.
How to read table, create csv, zip it and store in another table

But here my requirement is slightly different. I need to create CSV file for query result then zip the multiple csv file into one zip file .

I am able to create multiple CSV file but need help in creating ZIP file

and Connor said...

You can use the following PL/SQL routine from Anton Scheffer

https://github.com/yallie/as_zip

There is an example of its use in the as_zip.sql file.

Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, June 12, 2018 - 7:00 am UTC

Thanks for the solution.
Connor McDonald
June 13, 2018 - 1:42 am UTC

glad we could help

A reader, June 27, 2018 - 5:08 pm UTC

Thanks a lot for the solution, It solved my problem.

Need a small help. Can I get the details for procedures and function used and there are some hardcoded integers and do we have any specific reason for that.

Thanks in Advance
Connor McDonald
June 28, 2018 - 6:05 am UTC

I didn't write it - you'd need to reach out to the authors via github

More to Explore

CLOB/BLOB/etc

Complete documentation on Securefiles and Large Objects here