Hello,
I have a shell script where I am doing an isql to select some records. the result i get from the select statement is directed to an output file. I want to assign the result to a Shell variable so that I can use the retrieved in another routine.
e.g.
"isql -U${USER} -P${PASSWD} -S${SERVER} -D${DBNAME}" <<EOF>> output1
select Names from Book
... some error check from the result above...
declare @CustID varchar (50)
select @CustID = Customer ID from Customer
EOF
The CustomerID I retrieved above needs to be passed to a UNIX variable so that I can use it further down after the end of the isql.
I did look at some threads where this was questioned but most of the answers are to retreive the value from selects when doing the isql... such as
SOMEVARIABLE = `isql....
however in the above case the result from the first select would also be passed to SOMEVARIABLE... and if so then how would u extract the values that are specifically needed.
Any ideas would be much appreciated.
Thanks.