SqlAnswersQuery.docx - O'Quin Zone

perchmysteriousData Management

Dec 1, 2012 (4 years and 6 months ago)

170 views

SQLAnswersQuery


P a g e
1

Overview


S
ql
AnswersQuery is a utility which can be used to generate standardized ‘reports’ in a variety of output
formats, in seconds.

This tool connects to Oracle, SQL Server, PostgreSQL, MySQL, Access, dBase, or just about any OleDB

or
ODBC compatible database or database server. It allows you to enter
and execute a

query

against the
connected database
. The resulting data may then be viewed
i
n grid

format
,
in text

output
format, or the
tool can generate HTML, PDF, Word, Excel
, or C
SV

views (and
files
)

from the data

previously retrieved
.

Usage

On starting S
ql
Answ
ers
Query, you define the connection (ref Figure 1,) or re
-
use a previously defined
connection.


Figure
1

Once the connection has been opened, the ma
in application window is displayed, as shown
in Figure 2. The
main window
is, by default, split into two panes; the upper pane is the query edit pane, and the lower pane is
the output from the app. The Message output pane will be displayed at startup.
Note the control buttons
along the bottom of the
output pane; these buttons define which format will be displayed

and/or
saved
.

SQLAnswersQuery


P a g e
2


Figure
2


To use the utility, enter (or paste) the desired query into the query edit pane, then
choos
e the Execute
Query button (
) on the toolbar. This will cause your query to be executed, and the results displayed

on
the output pane (ref Figure 3.)

If no output format was previously selected, the default format is Text.


Figure
3

SQLAnswersQuery


P a g e
3

After running a query, when you then select a new output format, the document is then generated in the
format selected
, and displayed
.
(Figure 4)


The
output
document is stored in local memory as well, so that
when switching to a p
reviously viewed

output

format, there is no
ne of the

delay required to generate the
previously
generated report. However, if

viewing a

very

large recordset, it is
possible

to overflow memory
when multiple
large reports reside in

memory simultaneously.


Ea
ch time a query is executed, any existing viewed formats residing in main memory will be released.

The menu file
open
,
save

or
save as

options are
used

to
open or save
the SQL query.

To sa
ve the output,
right
-
click the tab of the appropriate output type,
then choose the save or save as option.


Figure
4

Options

S
ql
Answers
Query

makes many options available to the user

in the
Tools
/
Options

menu
.
While
somewhat
limited options are exposed

for

alter
ing

the program behavior
,
you
can

choose which of the output tabs are
available to you, edit the path to external applications
(
if needed,
)

you can specify the command timeout,
as well as the SQL Server batch separator character(s), and you can change the font and background color
of the
SQL query text editor. However, the greatest number of options, by far,
is

related to the output
formatting.
The HTML, PDF, RTF (Word,) Excel, and CSV output types each have a section. All of these
option sections except HTML
are tabbed, limited choice s
election forms. (Ref Figure 5.)


SQLAnswersQuery


P a g e
4




Figure
5


The more complex
file types have

more options,
the simpler types have
fewer

options
.

PDF has seven tabs
of options, while CSV has three
options
, in total.

The
HTML

output type
option form is different from all the others (Figure 6)
-

it
includes three checkbox
options,
but, it also includes
a
CSS (Cascading Style Sheet)

edit
window
,

containing
the style for 9 tags for
various
style

options

for the output
.


Note that when an output option is changed, you will not see the changes reflected in the output, until you
first refresh the output format in local memory.

SQLAnswersQuery


P a g e
5


Figure
6

This is accomplished in one of two ways.
The first option is

to re
-
query the database, which causes the
existing output in memory to be released. Then,
select the output format desired. This causes the output
to be regenerated. The second option

is to
right
-
click the output tab in question, then, select the
Rege
nerate Output

option.

Conclusion

SqlAnswersQuery is a powerful, flexible utility which can be used to generate standardized database output

in a variety of formats, in seconds.


It can connect to many different database types, including Oracle, SQL Server
, PostgreSQL, MySQL, Access,
dBase, and many other. Just about any OleDB or ODBC compatible database / database server may

be
accessed. SqlAnswersQuery allows you to enter and execute a query against the connected database
;

then
,
you may view the resulti
ng data in multiple formats, including text, data grid, HTML, PDF, Word

(RTF
,
)

Excel, or CSV. The output data may also be saved
to file
at will.

For more help, visit the forum at
sqlanswers.com