?
Solved

Bind Variables Passed from command line to script

Posted on 2009-06-30
3
Medium Priority
?
682 Views
Last Modified: 2013-12-07
I have the following SQL Script

  SET echo off       ;
  SET feedback off   ;
  SET heading off    ;
  SET newpage 0      ;
  SET pagesize 0     ;
  SET underline off  ;
--
SPOOL &1
--
SELECT
       name
FROM   persons p
WHERE  p.id = &2 ;
SPOOL OFF ;

When it's run the contents of the spool file are:
old   4: WHERE  p.id = &2
new   4: WHERE  p.id = 203762
Simon

Can anyone tell me how to suppress the display of the lines
old   4: WHERE  p.id = &2
new   4: WHERE  p.id = 203762
so they don't appear in the output?
0
Comment
Question by:Gaetor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 24748475
set verify off
0
 

Author Closing Comment

by:Gaetor
ID: 31598479
Excellent, thank you
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 24749022
glad I could help
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question