3 # Create table t1 in target database.
4 # load t1 table with condition and field mode option.
5 # unload the t1 table with -u option.
7 #AUTHOR : Jitendra Lenka
9 input
=${PWD}/cache
/CacheTable
/inputtest4.sql
14 REL_PATH
=${PWD}/cache
/CacheTable
17 cp $CSQL_CONFIG_FILE /tmp
18 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
20 # create table t1 in target DB.
21 echo CACHE_TABLE
=true
>>$CSQL_CONFIG_FILE
22 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
23 DS
="$DSN $DBUSER $PASSWORD"
24 rm -f /tmp
/csql
/csqlds.conf
25 touch /tmp
/csql
/csqlds.conf
26 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
32 isql
$DS < ${REL_PATH}/fmodeinsert.sql
>/dev
/null
2>&1
38 echo Table t1 created
in target DB.
40 rm -f /tmp
/csql
/csqltable.conf
41 touch /tmp
/csql
/csqltable.conf
43 echo "cachetable -t t1 -c \"f1<3\" -f \"f1,f3,f5\""
44 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-c "f1<3" -f "f1,f3,f5" >/dev
/null
2>&1
47 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
48 rm -f /tmp
/csql
/csqltable.conf
53 echo "select from t1 table"
55 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/selectt1.sql
58 rm -f /tmp
/csql
/csqltable.conf
59 touch /tmp
/csql
/csqltable.conf
61 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/drop.sql
>/dev
/null
2>&1
62 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
68 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-u >/dev
/null
2>&1
71 rm -f /tmp
/csql
/csqltable.conf
72 touch /tmp
/csql
/csqltable.conf
74 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/drop.sql
>/dev
/null
2>&1
75 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
80 echo "Table t1 unloaded from CSQL"
83 rm -f /tmp
/csql
/csqltable.conf
84 touch /tmp
/csql
/csqltable.conf
86 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
87 isql
$DS <${REL_PATH}/drop.sql
>/dev
/null
2>&1