3 #14. Create 't1' table in Target DB with two records,
4 # Load selected records into CSQL with -c "f1=1" option.
5 # select query executes the selected records from CSQL.
7 #Run this only under csql/test or on this directory, Otherwise it will fail.
9 # Author : Jitendra Lenka
11 input
=${PWD}/cache
/CacheTable
/inputtest4.sql
15 REL_PATH
=${PWD}/cache
/CacheTable
18 cp $CSQL_CONFIG_FILE /tmp
/csql.conf
19 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
20 isql
$DSN < ${REL_PATH}/inputtest4.sql
>/dev
/null
2>&1
23 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
27 echo Table t1 created with two records
in target db.
29 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
30 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
32 #cache from target to csql with -c option
33 echo "cachetable -t t1 -c \"f1=1\" "
34 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-c "f1=1" >/dev
/null
2>&1
37 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
38 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
40 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
41 isql
$DSN < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
42 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE
46 echo "select * from t1;"
47 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/selectt1.sql
49 rm -f /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
50 touch /tmp
/csql
/csqltable.conf
/tmp
/csql
/csql.db
52 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/drop.sql
> /dev
/null
2>&1
53 isql
$DSN < ${REL_PATH}/drop.sql
>/dev
/null
2>&1
55 cp /tmp
/csql.conf
$CSQL_CONFIG_FILE