Solved

Bind Variables Passed from command line to script

Posted on 2009-06-30
3
680 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
  • 2
3 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 500 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

Suggested Solutions

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

730 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