What Is WORA Form and How To Use It
For Impatient Men
Dont touch any buttons and menus - just press on QUERY.
Experiment as you like, feel free.
Columns
Form generating program, so called CGI-script, produces its
output ( document body, containing the form ) looking deeply
into database internals.
For the given table program extracts information about all
columns, aka fields, in this table - what are columns' names, what are
internal types of those columns and what are their lengths.
Next, program has lists of database functions which could be
applied to the fields you are planning to select.
This information is combined in such a way, that you can
- Mark on the screen what field you wanna be extracted and
which not,
- What functions should be applied to each column to be selected.
Condition, aka "WHERE clause"
In the specialized language for communication with relational
databases, SQL, you have possibilities to define conditions which
should be met for the record to be extracted. Specific SQL jargon
names it where clause.
SQL is very like to plain english, e.g.
SELECT some_function(some_field FROM) some_table
WHERE some_function(yet_another_field) "OPERATOR" "EXPRESSION"
OR
WHERE some_function(yet_another_field) "OPERATOR" "EXPRESSION"
AND
WHERE some_function(yet_another_field) "OPERATOR" "EXPRESSION"
...
Things are a bit more complicated, but you supposed to
catch the general idea.
Function,
"EXPRESSION" and
"OPERATOR" depend on yet_another_field
type.
WORA has very simplificated notion of
the where clause - all you can do is to define
single yet_another_field with a single function applied
to this field.
Naturally, only one "OPERATOR" and "EXPRESSION" available for
one condition.
I've already seen, that
char_field LIKE pattern
causes great trouble.
It was rewritten to be more user friendly.
See changes.
If you are a simple guy, just type substring.
To use full pattern matching enter
string literal as it should be entered in SQLPLUS.
The same is true for string comparisons.
Misc
So called group functions (like SUM,COUNT)
do exist. They are somewhat peculiar - you can't use usual
function (or none) applied to one field and group function applied
to another field in the same SQL statement.
It should be balanced in that sense.
Dont worry, WORA will tell you what Oracle thinks about your typos
and mistakes.
Frankly speaking, database error
descriptions ( which simply transferred from DB to you, dear user )
sometimes are very clear for John Dow, sometimes enigmatic :(
Examples
Lets imagine table all_names with several columns:
- name - character
- apartment - number
- floor - number
- phone - character
select initcap(name), phone from all_names
where floor > 100
will give capitalized names and phone numbers of all people
living high, almost in the sky.
ocr