Wednesday 15 February 2012

unix - Executing sql statement and storing value in variable -


I have a shell script trying to execute a simple SQL statement and storing it in a single variable is. But I am unable to do this. I am using Sigwin and I intend to use it in Unix. See script below

  "execute a script" echo Id = (sqlplus cimnewuser / cimnewuser @ cimnew identification id from the list where tablename = 'mCT_35618'; exit) "$ var" code>  

This is giving me the error I want to manipulate SQL in SQL New am

Thank you in advance!

You are not forgeting $ .

  var = $ (sqlplus cimnewuser / cimnewuser @ from the cimnew list in the list, where tablename = optionally, you can use brackets:  
 < Code> var = 'sqlplus ... `      

No comments:

Post a Comment