|I need to run a query in sqlplus in korn on a Red Hat Linux box and use the results to populate a korn variable. Like this:|
SQL> select count(*) from error_table;
Then, if the count is zero I want to populate $Flag1 to 0, otherwise $Flag1 becomes 1. After running several of these queries, my ksh script will decide to exit 1 or 0 depending on the values.
I'm able to make the sql connection and run the query, but don't know how to get the results back into the ksh program flow.