I have a function and based on a parameter I need to call different sql statement something like below?
function get_regions {
sqlplus -s <<EOF
$CONNECT_DB2
set pause off
set heading off
set pagesize 0
set feedback off
Case $var = "XXX"
case ZZZ
do this sql statement
case DDD
do this sql statement
case VVV
do this sql statement
exit
EOF
}
function get_regions {
sqlplus -s <<EOF
$CONNECT_DB2
set pause off
set heading off
set pagesize 0
set feedback off
Case $var = "XXX"
case ZZZ
do this sql statement
case DDD
do this sql statement
case VVV
do this sql statement
exit
EOF
}