Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Calling myscript.sql from within plsql block?
Hi,
I need to retrieve a value called 'dbversion' from on of our user tables and
then run
one or more .sql files based on the value retrieved. I was going to create a
little
procedure to do this but can't get the it to work correctly.
variable dbversion number
begin
select to_number(control_value) into :dbversion
from nat.spot_control
where upper(control_name) = 'DBVERSION';
if dbversion < 337 then
@c:\avanue\mainscriptORAFEB0502.sql
end if
end;
Dbversion is 337 but the script.sql runs anyways. Any suggestions, or alternative approaches to this problem? .
Best Regards,
Brian
Received on Thu May 02 2002 - 16:14:46 CDT