I have a stored function in Oracle database pAdCampaign.fGetAlgoGroupKey. How to see the code of this function.?
You should be able to see the pacakge body if you press the plus (+) button you had right at the name of your pacakge. If you don't see it, two things may be happening, you don't have the permissions (grants) on the user with which you are connected to the database session or the package body doesn't exist.
select text from all_source where name = 'PADCAMPAIGN' and type = 'PACKAGE BODY' order by line; Oracle doesn't store the source for a sub-program separately, so you need to look through the package source for it. If you're selecting from ALL_SOURCE you should include the OWNER in the WHERE clause.
A stored function (also called a user function or user-defined function) is a set of PL/SQL statements you can call by name. Stored functions are very similar to procedures, except that a function returns a value to the environment in which it is called. User functions can be used as part of a SQL expression.
If is a package then you can get the source for that with:
select text from all_source where name = 'PADCAMPAIGN' and type = 'PACKAGE BODY' order by line;
Oracle doesn't store the source for a sub-program separately, so you need to look through the package source for it.
Note: I've assumed you didn't use double-quotes when creating that package, but if you did , then use
select text from all_source where name = 'pAdCampaign' and type = 'PACKAGE BODY' order by line;
SELECT text FROM all_source where name = 'FGETALGOGROUPKEY' order by line
alternatively:
select dbms_metadata.get_ddl('FUNCTION', 'FGETALGOGROUPKEY') from dual;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With