The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 12:31 PM
How to pass two or more parameters to the main in shell script pinky UNIX for Dummies Questions & Answers 0 10-12-2007 08:54 AM
How to pass unix variable to SQLPLUS chiru UNIX for Advanced & Expert Users 1 06-09-2006 11:11 PM
How to pass variable to SQLPLUS in a ksh script? rwunwla Shell Programming and Scripting 6 05-25-2006 02:41 PM
passing parameters from a shell script to sqlplus phani Shell Programming and Scripting 2 03-13-2005 05:41 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-13-2005
Registered User
 

Join Date: Jul 2005
Posts: 7
How to pass Shell variables to sqlplus use them as parameters

Hi,

I am trying to pass some of the variables in my shell scripts to the sqlplus call and use them as parameters.

For example, I would like to replace the 'SAS', and '20050612' with $var1 and $var2, respectively, how can I do that?

--------------------------------------------------------
var1="ABC"
var2="123"
return_code=`sqlplus -s sars2d/password@kfdmlc <<end
set pagesize 0 feedback off ver off heading off echo off serverout on
variable rc number
exec kf_pkg_load.df_validate_file('SAS','20050612' ,null,null,null,null,null,null,null,null,:RC)
print rc
exit;
end`
--------------------------------------------------------

Thanks in advance for your help

John
Reply With Quote
Forum Sponsor
  #2  
Old 07-13-2005
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,699
Check this out.

Passing variables to sql from batch shell in linux
How to pass a oracle variable back to the shell script


If none of those suit your purpose, then use the search feature with the keyword sqlplus.

Vino
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 11:58 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0