3 # create table t1 and t2 in target db with 10 records
4 # load t1 table in csql with condition option and without field mode option.
5 # load table t2 with condition and field mode option.
6 # select from t2 table in CSQL and verify it displays only specified field
7 # values which satisfies the condition.
9 #Author : Jitendra Lenka
11 input
=${PWD}/cache
/CacheTable
/
15 REL_PATH
=${PWD}/cache
/CacheTable
18 cp $CSQL_CONFIG_FILE /tmp
19 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
20 echo CACHE_TABLE
=true
>>$CSQL_CONFIG_FILE
21 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
22 DS
="$DSN $DBUSER $PASSWORD"
23 rm -f /tmp
/csql
/csqlds.conf
24 touch /tmp
/csql
/csqlds.conf
25 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
31 isql
$DS < ${REL_PATH}/fmodecreate.sql
>/dev
/null
2>&1
36 echo Table t1 and t2 created
in target DB.
37 rm -f /tmp
/csql
/csqltable.conf
38 touch /tmp
/csql
/csqltable.conf
40 echo "cachetable -t t1 -c \"t1f1<5\" "
41 echo "cachetable -t t2 -c \"t2f1>15\" -f \"t2f1,t2f3,t2f5\" "
43 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-c "t1f1<5" >/dev
/null
2>&1
46 isql
$DS < ${REL_PATH}/dropt1t2.sql
>/dev
/null
2>&1
47 rm -f /tmp
/csql
/csqltable.conf
48 touch /tmp
/csql
/csqltable.conf
52 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t2
-c "t2f1>15" -f "t2f1,t2f3,t2f5"
55 rm -f /tmp
/csql
/csqltable.conf
56 touch /tmp
/csql
/csqltable.conf
57 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/drop.sql
>/dev
/null
2>&1
58 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
62 echo "select query on t1 and t2 table"
63 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/selectstar.sql
65 rm -f /tmp
/csql
/csqltable.conf
66 touch /tmp
/csql
/csqltable.conf
68 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1t2.sql
> /dev
/null
2>&1
69 isql
$DS <${REL_PATH}/dropt1t2.sql
>/dev
/null
2>&1