« Configure E-mail Alerts for Oracle Blocking | Main | Part One - E-mail Query Results in Message Body »
Sunday
Nov212010

Part Two - E-mail Oracle query results in a spreadsheet

Here's a simple way to e-mail Oracle query results in a spreadsheet. I wanted to make this script a bit more mature prior to posting, but sadly haven't had the time. There's two main things you'll need to look at prior to adopting this in your environment:
    1. The code sample accommodates a resultset of only four columns (ColumnA, ColumnB, ColumnC, and ColumnD).
    2. It will output to a .csv attachment. In our environment this defaults to open in Excel, so its works out very nicely.
Regardless if you're committed to e-mailing spreadsheets to your users I think this should suffice to get you on your way. Here's the sample:

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>