#!/bin/sh
#
#
# This may be run with the -noindex option to compare/verify indexing systems

SHSQL="shsql -echo -nat"
# SHSQL="shsql -echo -nat -noindex"

echo "*************************************************************"
echo "
1. "
$SHSQL "select * from assays where measnum = 2909"

echo "
2. "
$SHSQL "select * from assays where measnum in 2909,2910,2911"

echo "
3. "
$SHSQL "select * from assays where measnum in 9923,9924,2911,14318,6210"

echo "
4. "
$SHSQL "select * from assays where measnum inlike '17??' "

echo "
4-1. "
$SHSQL "select * from assays where measnum inlike '17??,9924,,36??' order by measnum (num)"

echo "
4-2. "
$SHSQL "select * from assays where measnum inlike '17??,9924,,36??,,' order by measnum (num)"

echo "
5. "
$SHSQL "select * from assays where varname = 'mucin'"

################ some crazy retrievals to test handling of -OR- terms, etc.
echo "
6. "
$SHSQL "select * from assays 
	where varname = 'mucin' or measnum in '2909,2915,2916,2917' or varname = 'thymus'
	order by measnum (num)"

echo "
7. "
$SHSQL "select * from assays 
	where varname like 'thymus*' or varname = 'mucin' or measnum in '2915,2916'
	order by measnum (num)"

################

# these should all return nothing..
echo "
8. "
$SHSQL "select * from assays where measnum inlike '17????' "
$SHSQL "select * from assays where measnum like '17????' "
$SHSQL "select * from assays where measnum like '17?' "
$SHSQL "select * from assays where measnum like '9??' "
$SHSQL "select * from assays where measnum like '4*' "
$SHSQL "select * from assays where measnum like '*a*' "
$SHSQL "select * from assays where measnum inlike '*a*,17????,17?,9??,4*' "
