I have a script getCount.sql that I use to extract the count of records from the table. the query is as below.
connect user/pwd@DB
spool C:\filepath\filename.txt
select count(distinct(column name))
from table name
where condition
/
spool off
exit;
I call this from getCount.bat file using the command
sqlplus /nolog @C:\filepath\getCount.sql
I am able to get the output into the file filename.txt. I need assistance to store this into a variable in the getCount.bat batch file and use it for further computing.