Html sql queries

Hello,

I have a sql report that runs just fine in sqlplus from my client. But when I run it in Toad it does not produce the html format as expected:

title center '<b><big> Inactive User Report ' skip 2
column department_name format a20 heading "Department"
column last_name format a30 heading "Last Name"
column first_name format a20 heading "First Name"
column salary format 9999999 heading "Salary"

set markup html on spool on entmap off

spool l2k_user_rpt.html

<my query>

spool off

I've tried executing it 3 ways in toad ... as a script (F5), from script runner , and the execute via SQLPLus. None of these work properly. Either they produce no output or they don't produce html output. Is this a Toad limitation or is there a way to get this to work in Toad?

Welcome back to the Toad forums.

First, would be good to understand what

"does not produce the html as expected"

means. Did html file get created or not? if created, what exactly wasn't right about it? No title? incorrect formatting? etc.

That said, here's a couple things to note...

  • TITLE should be TTITLE?
  • Probably most important is that any non-pathed files get created in the Toad (install) directory. Running your code in the Script Runner probably creates the file in that exe's directory (haven't tested).

I ran your SQL*Plus code (edited with TTITLE, my own query, different spool path, etc.) in SQL*Plus mode within my Toad 17.1 Editor and it ran fine. Hope the above helps.