.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>shsql: command syntax</title>
<body bgcolor=99cc99 vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td align=right><a href="shsql_home.html">
<img src="img/shsql.gif" border=0><br><small>SQL database system</a> &nbsp; </td></tr>
<td>
.>>

.TH command syntax TDH "18-MAR-2004   TDH scg@jax.org" 

.SH Command syntax
These rules apply to \fBshsql\fR commands:

.ig >>
<br><br><br>
.>>

.IP \(bu
Query "words" must generally be separated by whitespace.  
Quoted constants are considered one "word" for this purpose.
.ig >>
<a href="commalist.html">
.>>
\0Comma-delimited lists
.ig >>
</a>
.>>
are considered one word.
Otherwise, commas may trail words, but may not directly precede words.
.br
\fBWrong\fR: \fC SELECT A,B,C FROM TABLE WHERE A>10 \fR
.br
\fBCorrect:\fR \fC SELECT A, B, C FROM TABLE WHERE A > 10 \fR

.ig >>
<br><br><br>
.>>

.IP \(bu
Parentheses and carriage returns (newlines) may be used anywhere as 
desired for readability, except that newlines may not be embedded in 
literal text strings.

.ig >>
<br><br><br>
.>>

.IP \(bu
SQL command keywords, function names, and NULL are case insensitive.

.ig >>
<br><br><br>
.>>

.IP \(bu
Table names and field (column) names are case sensitive, max length 38 characters, 
may not contain any white space or punctuation character other than underscore (_),
and must begin with an alphabetic character.
(Temporary table names follow these rules too except that the first character in a 
temp table name is always the dollar sign ($)).

.ig >>
<br><br><br>
.>>

.IP \(bu
\fBshsql\fR reserved words should be avoided when choosing table and field names.
The following should definitely not be used (upper or lower case): 
FROM  WHERE  VALUES  INTO  SET  AND  OR  ON  NULL

.ig >>
<br><br><br>
.>>

.IP \(bu
Literal character strings are case sensitive and may be enclosed in double
quotes (") or single quotes(').  A literal quote may be represented by
supplying a preceding backslash.

.ig >>
<br><br><br>
.>>

.IP 
Allowable SQL syntax is limited to the constructs illustrated in this manual.
Compound constructs (such as sub-selects) and some other variants are not 
supported.  For example, joins always use "JOIN .. ON" syntax.
.ig >>
<a href="whereclause.html">
.>>
\0WHERE clauses
.ig >>
</a>
.>>
have some syntax limitations.  

.ig >>
<br><br><br>
.>>
.IP
No functions() are supported in WHERE clauses, and only
aggregation functions such as count() and avg() are supported in SELECT item lists.
Arithmetic, date and time handling, and string manipulation are not supported in
WHERE clauses or item lists; these must be done by your middleware.


.ig >>
<br><br><br>
.>>
.IP \(bu
The default wild card character for use in WHERE clauses is *.
To use the standard %, set \fCdbwildcard: %\fR in 
.ig >>
<a href="config.html#dbwildcard">
.>>
\0your project config file.
.ig >>
</a>
.>>

.ig >>
<br><br><br>
.>>

.IP \(bu
The \fItable\fR.\fIfieldname\fR construct can only be used when a join is being performed.  

.ig >>
<br><br><br>
.>>

.IP \(bu
The \fIdatabase\fR.\fItable\fR.\fIfieldname\fR construct is not supported anywhere.


.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="shsql_home.html">
<img src="img/shsql.gif" border=0></a><br>
<a href="Copyright.html">Copyright Steve Grubb</a> &nbsp;
</td></tr>
</table>
.>>
