3 #15. create table t1 and t2 in target DB with 10 records
4 # Load t1 table without condition option
5 # Load t2 with condition " t2f1 < 5 ".
6 # Select from t1, should show 10 records and t2 should show only 4 records
8 # Author : Jitendra Lenka
10 input
=${PWD}/cache
/CacheTable
/inputtest4.sql
14 REL_PATH
=${PWD}/cache
/CacheTable
17 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
18 echo CACHE_TABLE
=true
>>$CSQL_CONFIG_FILE
19 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
20 DS
="$DSN $DBUSER $PASSWORD"
21 rm -f /tmp
/csql
/csqlds.conf
22 touch /tmp
/csql
/csqlds.conf
23 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
26 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
30 # create table t1,t2 in target DB.
31 isql
$DS < ${REL_PATH}/create.sql
>/dev
/null
2>&1
34 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
38 echo Table t1 and t2 created
in target DB.
40 rm -f /tmp
/csql
/csqltable.conf
41 touch /tmp
/csql
/csqltable.conf
43 echo "cachetable -t t1"
44 echo "cachetable -t t2 -c \"t2f1<5\" "
46 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
>/dev
/null
2>&1
49 isql
$DS < ${REL_PATH}/dropt1t2.sql
>/dev
/null
2>&1
50 rm -f /tmp
/csql
/csqltable.conf
51 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
55 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t2
-c "t2f1<5"
58 rm -f /tmp
/csql
/csqltable.conf
59 touch /tmp
/csql
/csqltable.conf
60 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/drop.sql
>/dev
/null
2>&1
61 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
62 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
67 echo "select query on t1 and t2 table"
68 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/selectstar.sql
70 rm -f /tmp
/csql
/csqltable.conf
71 touch /tmp
/csql
/csqltable.conf
73 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1t2.sql
> /dev
/null
2>&1
74 isql
$DS <${REL_PATH}/dropt1t2.sql
>/dev
/null
2>&1
75 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE