3 #14. Create 't1' table in Target DB with two records,
4 # Load selected records into CSQL with -c "f1=1" option.
5 # Select from t1 in csql should display only one record with f1 value 1
7 # Author : Jitendra Lenka
9 input
=${PWD}/cache
/CacheTable
/inputtest4.sql
13 REL_PATH
=${PWD}/cache
/CacheTable
16 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
17 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
29 isql
$DS < ${REL_PATH}/inputtest4.sql
>/dev
/null
2>&1
32 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
36 echo Table t1 created with two records
in target db.
38 rm -f /tmp
/csql
/csqltable.conf
39 touch /tmp
/csql
/csqltable.conf
41 #cache from target to csql with -c option
42 echo "cachetable -t t1 -c \"f1=1\" "
43 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-c "f1=1" >/dev
/null
2>&1
46 rm -f /tmp
/csql
/csqltable.conf
47 touch /tmp
/csql
/csqltable.conf
49 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
50 isql
$DS < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
51 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
55 echo "select * from t1;"
56 $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
64 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE