Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2011

    Post Unanswered: Automating Queries and Reports

    So hi everyone,

    I just discovered this forum so mind me for not having answered any questions sofar .

    Situation: My company wants to run weekly reports on data from our Oracle database. I make the queries on the database and provide coworkers with an XLS file (or any other preferred format) for them to process it whatever way they want.

    Question: What tools/applications/methods do you use/are there, to run queries on set dates/times that also have the possibility to export to an CSV or XLS file (or any other usable file).

    Preferably I'd like to be able to use *.SQL files (containing the queries) and put them in an application that executes and exports them OR have some sort of planner.

    Currently we are using the Scheduled Tasks from Windows but I don't find it to be as efficient as it can be.

    (This is not just asking for a hand, I'm also hoping to start a discussion here)

    Thanks in advance!

  2. #2
    Join Date
    Feb 2006
    Provided Answers: 1
    There are lots of ways to accomplish this.
    Check this method out for creating/emailing file from database:
    Send mail from PL/SQL - Oracle FAQ

    Or for example you could schedule a perl script via cron or some other job scheduler that runs your oracle procedure or sql script that creates the file and then in the perl script email the file with mutt or other email program.

  3. #3
    Join Date
    Jan 2011
    @Spacebar: Thanks for that, I also found a way to export SQL to XLS using spool.
    set term off
    set echo off
    set pages 0 head on emb on newp none
    set markup html on spool on
    spool data.xls
    query goes here
    spool off
    set markup html off spool off
    This works really well for me and was exactly what im looking for. also im looking into your link now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts