Two Laptop Bag*
The moose likes JDBC and the fly likes Testing a simple Oracle PL SQL function using toad sql client? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Testing a simple Oracle PL SQL function using toad sql client?" Watch "Testing a simple Oracle PL SQL function using toad sql client?" New topic
Author

Testing a simple Oracle PL SQL function using toad sql client?

Vinod Vijay
Ranch Hand

Joined: Sep 13, 2011
Posts: 137

Hi, I'm new to Oracle PL SQL.
there is a function which I need to test. I just need to check the result by printing its output on console by passing few parameters. I'm using Toad here as oracle sql client.

Function which needs to be tested is as follows:-



I seriously don't understand this IN and OUT Parameters.
I think IN parameters are those which I will pass in this function and OUT parameters is the return value from this function, please tell me am I right at this moment?

Right I'm trying to do the testing like by creating a PL SQL procedure and calling this fucntion in that with parameters passing in IN parameters and assuming that I will get some results in OUT parameters and finally I will print those OUT parameters on toad console like:-



Why I'm getting the error? Am I doing the testing in right way? If no, then how?

Vinod Vijay Nair
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2500
    
    8

Welcome to the Ranch, VinodVijay !
Do you use the correct syntax for creating a function?

I don't see a return clause in your code.


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Testing a simple Oracle PL SQL function using toad sql client?