I have a shell script which is trying to execute a simple sql statement and intend to store the result in single variable. But i am unable to do it.I am using Cygwin and intende
You are missing a $.
$
Try:
var=$(sqlplus cimnewuser/cimnewuser@cimnew select ID from catalog where tablename='MCT_35618'; exit)
Alternatively, you can use backticks:
var=`sqlplus ...`