.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: lists</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 lists TDH "18-MAR-2004   TDH scg@jax.org" 

.SH Comma-delimited lists
A comma-delimited list (or "list" for short) is a list of items, delimited with commas.  
A list is stored as a single alphanumeric variable or field.
Individual members cannot contain embedded commas.  
Embedded whitespace is allowed within or outside of individual list members (the list
may need to be quoted).
.LP
An example: \fCHarry,Ron,Hermione\fR

.LP
Lists are most suitable where individual values are known to be small in size 
(such as controlled-vocabulary tags or integer id numbers) and where it is known that 
there will not be a huge number of choices. 
The total length of a comma-delimited list is limited to 250 characters.

.LP
Lists allow a set of values to be manipulated as a unit, which is often
convenient.  They can be used within
.ig >>
<a href="condexes.html">
.>>
\0conditional expression
.ig >>
</a>
.>>
  and
.ig >>
<a href="whereclause.html">
.>>
\0WHERE clause
.ig >>
</a>
.>>
operators such as \fCIN\fR, \fCINRANGE\fR, and \fCCONTAINS\fR.  Some
.ig >>
<a href="func.html">
.>>
\0functions
.ig >>
</a>
.>>
also work with lists.

.LP
In QUISP,
lists are a convenient way to store responses entered from 
\fC<SELECT MULTIPLE>\fR boxes on CGI forms.  The
.ig >>
<a href="optionlist.html">
.>>
\0#optionlist
.ig >>
</a>
.>>
directive allows
<SELECT MULTIPLE> boxes to be initialized directly by a list.
When a form is submitted <SELECT MULTIPLE> responses can be converted to a list in the 
.ig >>
<a href="cgiforms.html">
.>>
\0form target page
.ig >>
</a>
.>>
using the
.ig >>
<a href="cgivar.html">
.>>
\0#cgilistvar
.ig >>
</a>
.>>
directive.

.LP
In \fBshsql\fR database applications, lists can often be used to 
represent shallow one-to-many or many-to-many relationships without having to 
resort to a separate relation table.  
Since lists contain a vector of information they cannot be involved in \fCJOIN\fRs.
If \fCJOIN\fRs are not required, use of lists can simplify design and code.


.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>
.>>
