Toad World® Forums

Function turn into Procedures



I just started using QCTO and it looks great. I noticed something weird, though.

When I have a Packaged Function the Builder is under the assumption that it is a procedure.
When it is a stand-alone function, the Program Selector sees it as a Function, but the Builder still thinks it is a Procedure.

This only happens when the return type is anchored to a table.
Here is my test code:
SQL> create table t
2 (x int
3 ,value varchar2(10)
4 );

Table created.

SQL> create package alx_pkg
2 is
3 function get_value (p_id in number)
4 return t.value%type;
5 end;
6 /

Package created.

SQL> create or replace function get_value (p_id in number)
2 return t.value%type
3 is
4 begin
5 return null;
6* end;
SQL> /

Function created.

Any ideas?


Sadly, this is a bug; we have fixed it for the 1.3 release (hopefully available within the next couple weeks). You can “work around” the problem by replacing the %TYPE return type with an actual datatype (NUMBER, VARCHAR2, etc.).

Obviously, that is not a real solution, but it will let you move forward with the test definition.


Thanks for your reply.

I figured as much, thought I let you know. Just noticed the “Quest Code Tester Assistance” link, I should have used that instead of the discussion forum I guess.


Please use the forums - this way our questions and answers appear for all.

However you can use the Assistance/Email form if you feel more comfortable reporting issues privately.