I have n number of SQL queries needs to executed in Shell. Result of this query need to assign in a variable. Once all the queries are executed script needs to exit.
Sample Query:
SQL 1: Select Count(*) from TABLE GROUP BY COL1,COL2
SQL 2: Select Count(*) from TABLE GROUP BY COL1,COL2
Result of the above queries need to assign in variables and shell needs to exit once execution of all queries completed.
Can any one post how it can be achieve in shell script?
Envionment: LINUX
Database : ORACLE 11.G