Need a help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need a help
# 1  
Old 09-25-2008
Need a help

I am calling sql script from host program

how to capture the return message
here is part of code
Code:
getcount()
{
xx1=`$ORACLE_HOME/bin/sqlplus -s apps/ostgapps1 2>/dev/null << EOF
     WHENEVER SQLERROR EXIT 1
     SET HEADING OFF SET FEEDBACK OFF SET VERIFY OFF SET PAGESIZE 0
       
     WHENEVER SQLERROR EXIT SQL.SQLCODE;
      select count(*) from XXPH_CMS_INVOICE_ALL;
      exit
EOF`
}


Is there any way that I can get the total count as return
any help would be highly apprecited.
# 2  
Old 09-25-2008
what output you are getting from above code??
# 3  
Old 09-25-2008
Just take out the assignment and the backticks. Call the function within backticks instead.

Code:
xx1=`getcount`

# 4  
Old 09-25-2008
thanks got it

${xx1}
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question