Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Calling myscript.sql from within plsql block?

Calling myscript.sql from within plsql block?

From: Brian Peasey <bpeasey_at_doncarsys.com>
Date: Thu, 02 May 2002 21:14:46 GMT
Message-ID: <a%hA8.8776$uE2.547913@news2.calgary.shaw.ca>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US