Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3360996
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:05:06+00:00 2026-05-18T03:05:06+00:00

I have a report that I need to export to a csv file for

  • 0

I have a report that I need to export to a csv file for n number of vendors. i have a feeling that I will need to run this more than once so I would like to automate it as much as possible. I wrote the sql plus needed to for one vendor, I’m wonder how can script it to run for each vendor. I have the vendor list stored in the table in the db, but knowing I can’t put spool in an pl/sql block, I’m wonder how I can loop through each vendor to create their file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:05:07+00:00Added an answer on May 18, 2026 at 3:05 am

    I’ve done similar things by having one script generate a secondary script and then execute that script. Approximate example:

    set serveroutput on
    set termout off
    spool temp_script.sql
    Begin
        for r in (select * from vendors) loop
            dbms_output.put_line('spool '||r.vendor_name||'.csv');
            dbms_output.put_line('data is: '||r.data);
            /*feel free to put other output commands here */
            dbms_output.put_line('spool off');
        end loop;
    end;
    spool off
    @temp_script.sql
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple jasper report that does not need a datasource so I
I have a Java application that is generating JasperReports. It will create as many
EDIT: the database is Access 2007 Hi, I'm new here and I need some
I know that I can use the terminal and the system-profiler command to determine
Table schema is set up something like this: userID Points timestamp 1 40 3
Let me explain my situation. Currently, I have a lot of applications running on
An iPhone app which I am creating generates reports from a Core Data database
I'm not too new to VB.Net and the syntax, but I'm not an expert.
I'm working on a WinForms C# 3.0 / .NET 3.5 project involving building some
I am trying to work out the overhead of the ASP.NET auto-naming of server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.