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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a package function

Status
Not open for further replies.
Apr 20, 2000
41
0
0
US
Hello, I was wondering if a function within a package can be executed from a call in a .BAT file? I'd like to use win scheduler to run a bat file that call a function. Just for testing purposes.

Here's the syntax
d:\oracle\ora81\BIN\SQLPLUS.EXE -S jobs/xxxx@dbase EXEC pkg_testing.bundles

Is this possible? Getting a 'volume file header' error message when I run it.

thanks
 
Put your command into a SQL script, then run it from the command line:

[tt]d:\oracle\ora81\BIN\SQLPLUS.EXE -S jobs/xxxx@dbase @script[/tt]

...where script is a file called script.sql containing EXEC pkg_testing.bundles
 
Meridian,

...and just a technical consideration in addition to Lewis's excellent suggestion: I presume that your "EXEC pkg_testing.bundles" is, in fact, a packaged procedure and not a packaged function (as you originally suggested). Syntactically, you cannot invoke a "function" with the syntax you used...you used syntax for a stored "procedure".[wink]

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)

Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top