Hi -
I just want ask the steps when trying to create a simple SQL select statement in UNIX inside/within IF..THEN..FI statement.
I know how to use the 'select' and 'if..then' statements in SQL*Plus, but I'm having a difficulties having a UNIX script to point to variables: If 'ABC' to 'Select...'
Example:
if [ "$?" = 'ABC' ] then SELECT employid, name, age FROM tablename; else exit 1 fi
if [ "$?" = 'XYZ' ] then SELECT employid, name, age FROM tablename; else exit 1 fi
How do I put it in a UNIX script more correctly syntax wise and right to the point?
Thanks.