SelfRunner

SelfRunnerOdbc

TwoPanelQueryCollection

TwoPanelInlineQueries

TwoPanelTabIndSizeNumRows

TwoPanelTabIndLastAnalyzed

TwoPanelTableDataCompare

CreRunSchemaNumRows

CreRunNumRowsAllDbTab

MakeHtm

MakeHta

GetEnvVars

Click on the image for a bigger view

Two_panel_inline_queries.jpg


Create
a simple clickable htm page
with
one-line queries.
Two_Panel_Inline_Queries.bat
Create a simple clickable htm page with one-line queries.

If you remember, the other htm library script [Two_panel_script_collection.bat] collects the query text from other script files by using the type statement to create a new temporary
file to generate and display the two-panel htm screen.
This script has in-built one-liner queries that select and display data from  v$views.
Please change the select statements in the script as required and don't forget to change the connect string.

Here is the script:
:: ======================================================================
:: Two_Panel_Inline_Queries.bat - For simple inline queries
:: ======================================================================
:: Generate and run a 2 panel htm page with LHS index page with clickable
:: links to output pages on the RHS.
:: ======================================================================
:: Jerome Christopher. [Jerome_christopher@yahoo.com]
::
http://htmsql.blogspot.com
:: http://www.sqlhtm.com/sqlhtm
:: ======================================================================
@echo off
SET CDIR=C:
del %CDIR%\10a.tmp %CDIR%\20a.tmp %CDIR%\30a.tmp %CDIR%\40a.tmp %CDIR%\50a.tmp
del %CDIR%\10a.htm %CDIR%\20a.htm %CDIR%\30a.htm %CDIR%\40a.htm %CDIR%\50a.htm
del %CDIR%\mk.out %CDIR%\welcome.htm %CDIR%\w1a.tmp %CDIR%\tpiq_left.htm
(
echo set heading off feedback off termout off
echo alter session set nls^_date^_format^='dd-mon-yyyy hh24:mi:ss';
echo prompt  ^<html^>^<head^>
echo select '^<'^|^|'style type='^|^|''''^|^|'text'^|^|'^/'^|^|'css'^|^|''''^|^|'^>'^|^| chr^(10^)^|^|
echo 'body  {font:7pt bold Arial,Helvetica,sans-serif; color:black; background:^}'^|^|chr^(10^)^|^|
echo 'p     {font:bold 8pt Arial,Helvetica,sans-serif; color:black; background:}'^|^|chr^(10^)^|^|
echo 'table {font:8pt Arial,Helvetica,sans-serif; color:Black; background:#f7f7e7; vertical-align:top;}'^|^|chr^(10^)^|^|
echo 'tr    {font:bold 10pt Arial,Helvetica,sans-serif; color:red; background:#f7f7e7;}'^|^|chr^(10^)^|^|
echo 'td    {font:bold 7pt Arial,Helvetica,sans-serif; color:black; background:aqua;}'^|^|chr^(10^)^|^|
echo 'th    {font:bold 6pt Arial,Helvetica,sans-serif; color:white; background:olive; }'^|^|chr^(10^)^|^|
echo 'a     {font:8pt bold Arial,Helvetica,sans-serif; color:darkblue; background:; vertical-align:top;}'^|^|chr^(10^)^|^|
echo 'h1    {font:bold 14pt verdana,Helvetica,sans-serif; color:Black; background:; }'^|^|chr^(10^)^|^|
echo '^<'^|^|'^/'^|^|'style^>' from dual;
echo prompt ^<^/head^>^<body^>
echo SET MARKUP HTML ON TABLE ^"^" ENTMAP OFF 
echo select name,to_char^(sysdate,'dd-mon-yy hh:mi:ss pm Dy'^) Today from v$database;
echo SET HEADING ON
)>%CDIR%\mk.out
echo spool %CDIR%\10a.htm            >%CDIR%\10a.tmp
type %CDIR%\mk.out                   >>%CDIR%\10a.tmp
echo prompt ^<h1^>V$DATAFILE^<^/h1^> >>%CDIR%\10a.tmp
echo select * from v$datafile;       >>%CDIR%\10a.tmp
echo prompt ^<^/body^>^<^/html^>     >>%CDIR%\10a.tmp
echo spool off                       >>%CDIR%\10a.tmp
echo exit                            >>%CDIR%\10a.tmp
echo spool %CDIR%\20a.htm            >%CDIR%\20a.tmp
type %CDIR%\mk.out                   >>%CDIR%\20a.tmp
echo prompt ^<h1^>V$SYSSTAT^<^/h1^>  >>%CDIR%\20a.tmp
echo select * from v$sysstat;        >>%CDIR%\20a.tmp
echo prompt ^<^/body^>^<^/html^>     >>%CDIR%\20a.tmp
echo spool off                       >>%CDIR%\20a.tmp
echo exit                            >>%CDIR%\20a.tmp
echo spool %CDIR%\30a.htm            >%CDIR%\30a.tmp
type %CDIR%\mk.out                   >>%CDIR%\30a.tmp
echo prompt ^<h1^>V$SESSTAT^<^/h1^>  >>%CDIR%\30a.tmp
echo select * from v$sesstat;        >>%CDIR%\30a.tmp
echo prompt ^<^/body^>^<^/html^>     >>%CDIR%\30a.tmp
echo spool off                       >>%CDIR%\30a.tmp
echo exit                            >>%CDIR%\30a.tmp
echo spool %CDIR%\40a.htm                >%CDIR%\40a.tmp
type %CDIR%\mk.out                       >>%CDIR%\40a.tmp
echo prompt ^<h1^>V$SYSTEM_EVENT^<^/h1^> >>%CDIR%\40a.tmp
echo select * from v$system_event;       >>%CDIR%\40a.tmp
echo prompt ^<^/body^>^<^/html^>         >>%CDIR%\40a.tmp
echo spool off                           >>%CDIR%\40a.tmp
echo exit                                >>%CDIR%\40a.tmp
echo spool %CDIR%\50a.htm            >%CDIR%\50a.tmp
type %CDIR%\mk.out                   >>%CDIR%\50a.tmp
echo prompt ^<h1^>V$WAITSTAT^<^/h1^> >>%CDIR%\50a.tmp
echo select * from v$waitstat;       >>%CDIR%\50a.tmp
echo prompt ^<^/body^>^<^/html^>     >>%CDIR%\50a.tmp
echo spool off                       >>%CDIR%\50a.tmp
echo exit                            >>%CDIR%\50a.tmp
echo spool %CDIR%\welcome.htm                     >%CDIR%\w1a.tmp
type %CDIR%\mk.out                                >>%CDIR%\w1a.tmp
rem echo select name,to^_char^(sysdate,^'dd-mon-yy hh:mi:ss pm Day^'^) Today from v$database;    >> %CDIR%\w1a.tmp
echo prompt ^<a^>TPIIQ^<^/a^>                     >>%CDIR%\w1a.tmp
echo prompt ^<h1 style=^"font:bold 12pt verdana;color:darkblue^"^>Two_Panel_Inline_Queries - Main Menu^<^/h1^>     >>%CDIR%\w1a.tmp
echo spool off                                    >>%CDIR%\w1a.tmp
echo exit                                         >>%CDIR%\w1a.tmp
sqlplus -s " dba-user/pwd@db " @%CDIR%\10a.tmp
sqlplus -s "
dba-user/pwd@db " @%CDIR%\20a.tmp
sqlplus -s "
dba-user/pwd@db " @%CDIR%\30a.tmp
sqlplus -s "
dba-user/pwd@db " @%CDIR%\40a.tmp
sqlplus -s "
dba-user/pwd@db " @%CDIR%\50a.tmp
sqlplus -s "
dba-user/pwd@db " @%CDIR%\w1a.tmp

(
echo ^<html^>^<head^>^<^/head^>^<body^>^<table style^^=^"text-align: left; background-color: lime;^" border=^"0^" cellpadding=^"0^" cellspacing^=^"0^"^>
echo  ^<tbody^>    ^<tr^>
echo       ^<td style^=^"font:10 pt verdana bold^"^>^<a href^=^"file:%CDIR%\10a.htm^" target^="c2r1"^>1.DataFile^<^/a^>^<^/td^>^<^/tr^>^<tr^>
echo       ^<td style^=^"font:10 pt verdana bold^"^>^<a href^=^"file:%CDIR%\20a.htm^" target^="c2r1"^>2.Sysstat^<^/a^>^<^/td^>^<^/tr^>^<tr^>
echo       ^<td style^=^"font:10 pt verdana bold^"^>^<a href^=^"file:%CDIR%\30a.htm^" target^="c2r1"^>3.Sesstat^<^/a^>^<^/td^>^<^/tr^>^<tr^>
echo       ^<td style^=^"font:10 pt verdana bold^"^>^<a href^=^"file:%CDIR%\40a.htm^" target^="c2r1"^>4.SystemEvent^<^/a^>^<^/td^>^<^/tr^>^<tr^>
echo       ^<td style^=^"font:10 pt verdana bold^"^>^<a href^=^"file:%CDIR%\50a.htm^" target^="c2r1"^>5.Waitstat^<^/a^>^<^/td^>^<^/tr^>^<tr^>
echo ^<^/tr^>^<^/tbody^>^<^/table^>^<^/body^>^<^/html^>
)>%CDIR%\tpiq_left.htm
(
echo ^<html^>
echo   ^<head^>
echo     ^<title^>
echo       Two_Panel_Inline_Queries
echo    ^</title^>
echo   ^<^/head^>
echo   ^<FRAMESET^>
echo   ^<FRAMESET COLS=^"10^%%^,^*^"^>
echo   ^<FRAMESET ROWS^=^"99^%%^,^*^" border^=1^>
echo   ^<FRAME NAME^=^"c1r1^" SRC^=^"%CDIR%^\tpiq_left.htm^" ^>
echo   ^<^/FRAMESET^>
echo   ^<FRAMESET ROWS^=^"99%%^,^*^" border^=1^>
echo   ^<FRAME NAME^=^"c2r1^" SRC^=^"%CDIR%^\welcome.htm^" ^>
echo   ^<^/FRAMESET^>
echo   ^<^/FRAMESET^>
echo ^<^/html^>
)>%CDIR%\tpiq_main.htm
cmd /c %CDIR%\tpiq_main.htm
exit

 

Home

Scripts

Tips

Misc

Resume

Tamil

JobSearch

www.sqlhtm.com   Copyright Jerome S. Christopher 2010