How do I stores columns values retrieved from a table into a variable in my shell script.
I have the following code:
#!/usr/bin/ksh
echo "This script will try to connect to sql plus and displays the date"
echo
sqlplus user/password << EOF
SELECT sysdate
from dual;
EOF
exit;
echo "End of SQL"
I need to store the value of sysdate to a local variable and echo it. How do I do that?
This worked for me.