I have a sql script within a shell script that querys an oracle database and saves the result to a text file using spool function. this work fine.
but before spooling the result, I want to give it the names of each column as follows using the following command:
echo "emplyee_id | employee_name | employee_address "> employee_detail.txt
I can't include the above text in the employee_detail.txt (just the result of sql spool command). is it because the spool automatically empties a file before spooling the result? how do I include the above text?