|
|
Re: How to pass sql result set to unix shell script variable [message #98544 is a reply to message #97691] |
Thu, 23 December 2004 23:05 |
vijayalakshmi
Messages: 4 Registered: February 2004
|
Junior Member |
|
|
I am trying to run a sql ( that returns a count(*) )through a script in shell . And I want to pass the count(*) value of that sql to a variable in the shell script. How can I achieve it?
Answer : Put Set head off in the script. Get the output of the sql query in a file and truncate all the spaces in the file , now the file will only have the count of records, which you can use it set in a variable
|
|
|