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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need Unix script for executing oracle query ravi gongati Shell Programming and Scripting 14 03-24-2008 05:53 AM
How to execute multiple(batch) oracle script in unix mechine ravi gongati Shell Programming and Scripting 2 03-21-2008 07:37 AM
$HOME Not Getting Set for Oracle Scheduler Script at Runtime shew01 Shell Programming and Scripting 4 12-14-2007 08:31 AM
Perl script variable passed to Oracle query rahulrathod Shell Programming and Scripting 1 05-30-2007 09:57 AM
Can Unix (Solaris) execute a dos .bat script? BCarlson UNIX for Dummies Questions & Answers 4 08-26-2006 09:52 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-01-2008
infyanurag infyanurag is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 65
Execute oracle query determined at runtime from a unix script

Hi

I am trying to run a SQL statement from a unix script determined at runtime.
It is throwing me an error. Please advise some solution to this.

echo "Enter username for the database"
read username

echo "Enter password for the database"
read password

echo "Enter SQL stmt"
read sqlstatement

sqlplus ${username}/${password} <<EOF

spool output.lst;

execute immediate '$sqlstatement';

spool off;
EOF
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:03 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0