Home » SQL & PL/SQL » SQL & PL/SQL » assigning a filname to a variable and running the variable name from the prompt
assigning a filname to a variable and running the variable name from the prompt [message #37951] Fri, 08 March 2002 06:04 Go to next message
theak
Messages: 3
Registered: March 2002
Junior Member
cannot get this to work

i.e.
accept p_report prompt 'enter report to run: '
start 'c:sqlreport' || p_report

also (same as above
accept p_report prompt 'enter report to run: '
declare
v_report varchar2(50) := &p_report;
begin
v_report := 'c:sqlreport' || v_report;
@v_report;
end;

1st example outputs - cannot find file c:sqlreport.sql

2nd example - cannot find file v_report.sql

my question is - how do I assign a file name to a variable and running the script with
start variable.value
or
@variable.value

thanks in advance
theak
Re: assigning a filname to a variable and running the variable name from the prompt [message #37952 is a reply to message #37951] Fri, 08 March 2002 06:37 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
try this:

accept p_report prompt 'enter report to run: '
start 'c:sqlreport&p_report'
thanks for the response [message #37979 is a reply to message #37951] Tue, 12 March 2002 05:03 Go to previous message
theak
Messages: 3
Registered: March 2002
Junior Member
thanks for the response
Previous Topic: updating records using imp. ???
Next Topic: Cursors
Goto Forum:
  


Current Time: Fri Apr 26 10:15:42 CDT 2024