Package Question
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Package Question

Hybrid View

  1. #1
    Join Date
    Apr 2001
    Posts
    4
    I have a package (PKG_Validation) with two procedures (usp_test1 and usp_test2) and one function (uf_loc).

    Is there a system table/view that I can query that will show all the procedures/functions within a package?


    Thank you in advance.

  2. #2
    Join Date
    Feb 2001
    Posts
    184
    Just Issue

    Desc PKG_Validation

    It will show the Procedure/ Function name and the Parameters along with Mode.

    Hope this is what you want.

    Thanks

  3. #3
    Join Date
    Apr 2001
    Posts
    4
    Actually , I am looking for a query that will give me back list of procs/function names that are defined in the package.


    Thank you.


  4. #4
    Join Date
    Jul 2000
    Posts
    296
    With this query you get the parameters of procedures and functions in the package:
    SELECT * FROM user_arguments
    WHERE package_name = 'PKG_VALIDATION' ;


    With this query you get procedures and functions in the package:
    SELECT object_name,
    decode(min(position),0,'FUNCTION',1,'PROCEDURE',null) TYPE
    FROM user_arguments
    WHERE package_name = 'PKG_VALIDATION'
    GROUP BY object_name;

  5. #5
    Join Date
    Apr 2001
    Posts
    4
    Thank you very much. It works like a charm.

    YOU ARE THE MAN/WOMAN :-)


  6. #6
    Join Date
    Aug 2000
    Posts
    462
    What if you also wish to see those procedures which take no parameters?

  7. #7
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by kmesser
    What if you also wish to see those procedures which take no parameters?
    From the same view: USER/ALL/DBA_ARGUMENTS. Packaged procedures and functions are listed there regardles of their parameters.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  8. #8
    Join Date
    Jul 2000
    Posts
    296
    For procedures and functions (in packages) without parameters, the column argument_name is null. For procedures column data_type is null, for functions data_type is datatype of return type.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width