You have some data.

You want to email it to someone.

You don’t want them to have to open an attachment.

You want it to be in an HTML-Tabl’ish delivery device.

In SQL Developer, write your query.

Export to HTML > File.

Open Outlook.

Start your message.

Attach File

Point to your HTML File

DON’T CLICK ON THE INSERT BUTTON

On the INSERT button, there’s a drop-down widget. Click that instead. And then choose, ‘Insert as Text.’

Ta-da?
Ta-da?

Our generated HTML has an some javascript which adds a search mechanism to your webpage. That will render as an ugly red box in your email message…just backspace over it.

I realize this is a few extra clicks than you might want, but it’s probably still faster than what you’ve been doing.

Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

4 Comments

  1. Is there a way to override the CSS used in the export? I find myself hand-editing the exported html file every time to get rid of the “width: 100%” in the table CSS.

  2. If nice HTML formatting is not so important, and Excel is available, I find following steps convenient (similarly, new email message windows is assumed to be open):

    – Ctrl-A (select all rows in SQL Developer results table)
    – Ctrl-Shift-C (copy selected; including header row)
    – Alt-Tab (or WindowsKey and type ‘excel’-Enter) (switch to opened Excel)
    – Ctrl-V
    – Ctrl-C (this time, table format is also on clipboard)
    – Alt-Tab (switch to opened new message window)
    – Ctrl-V

    Cheers

    • Paul Kern

      What a great time-saver, Strahija! So quick to copy/paste to Excel (and thank for the Ctrl-Shift-C to also include the header, that’s key!). I was so ready to try Jeff’s approach, even though I really try to avoid save to file, then find the file (ugh) and insert, so for me your approach is a great time-saver.

      Toad is a SQL IDE that made it easy to export as HTML to Clipboard so hopefully in the future SQL Developer will add this feature!

Write A Comment