adding test scripts
[csql.git] / test / sql / Aggregate / test026.ksh
blobb192f84f0d3ce2ede9a7c0037fb770e00024f80f
1 #!/bin/ksh
2 # Testing Join on 5 sales tables.
3 # Create 5 tables like client_master,product_master,salesman_master,sales_order,sales_order_details.
4 # populate the above tables with required values.
5 # Test join, aggregate and having on them by executing the following query:
6 # List the productno , descriptions and their totally_ordered_quantities(sum).test count,min,max also.
8 QUITFILE=${PWD}/sql/Aggregate/quit.sql
9 REL_PATH=.
10 if [ -s "$QUITFILE" ]
11 then
12 REL_PATH=`pwd`/sql/Aggregate
15 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/sales_tables.sql
16 if [ $? -ne 0 ]
17 then
18 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/sales_table_drop.sql
19 exit 1;
22 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/sales_join_aggregate1.sql
23 if [ $? -ne 0 ]
24 then
25 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/sales_table_drop.sql
26 exit 2;
29 $CSQL_INSTALL_ROOT/bin/csql -s ${REL_PATH}/sales_table_drop.sql
30 if [ $? -ne 0 ]
31 then
32 exit 3;
35 exit 0;