Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL*PLUS HELP

Status
Not open for further replies.

kilabru

Programmer
Oct 15, 2002
26
0
0
US
I am exporting test with criteria. How do I prevent the user input from showing up on the output file? The argument is in the where clause. I am using a .bat file to run the script, don't know if that helps.

I have provided results and script.

Results:

Enter value for 2: 'IR'
old 8: where vendor = &2
new 8: where vendor = 'IR'
1000*200*IR******************* ----------------------------------------------------

Script:

set echo off
set termout off
set pagesize 0
set heading off
set feedback off
set serveroutput off
set linesize 1000



spool graybar_out.txt




select rfqnum||'*'||rfqlinenum||'*'||vendor||'*'||quotationlineid||'*'
||itemnum||'*'||manufacturer||'*'||modelnum||'*'||orderqty||'*'
||orderunit||'*'||unitcost||'*'||conversion||'*'||linecost||'*'
||eoq||'*'||deliverytime||'*'||deliverydate||'*'||enterdate||'*'
||enterby||'*'||memo||'*'||description||'*'||quotestartdate||'*'
||quoteenddate||'*'
from quotationline
where vendor = &2;

quit

----------

John
 
I set verify off and this my result now:

Enter value for 2: 'IR'
1000*200*IR*******************
Is there a way to get rid of the Enter value part??

 
But how will you enter the value? If you pass it from outside, you may use && instead of &.
 
Well, I still want it to ask the user for criteria. I just don't want the "ENTER VALUE" part to be in my output file...in this case a .txt file. Is that even possible?
 
You may ask user with ACCEPT command before spooling
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top