Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6792697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:00:11+00:00 2026-05-26T18:00:11+00:00

I have Oracle Package named DEF , with 1 function inside named ABC that

  • 0

I have Oracle Package named DEF , with 1 function inside named ABC that accept 1 string argument.
May I know how to call this function ABC directly in TOAD Editor?

Thanks in advance.

CREATE OR REPLACE PACKAGE HPQ_IF.def AS
  FUNCTION def(p_sql IN VARCHAR2)
  RETURN VARCHAR2;
END def;
/


  FUNCTION abc(p_sql IN VARCHAR2)
  RETURN VARCHAR2
  IS
  j NUMBER;

  BEGIN
    dbms_output.put_line(p_sql);
    RETURN 'Done';
  END abc;

Last error (using first answer below):

[Error] Execution (6: 31): ORA-06550: line 6, column 31:
PLS-00302: component 'abc' must be declared
ORA-06550: line 6, column 3:
PL/SQL: Statement ignored
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:00:12+00:00Added an answer on May 26, 2026 at 6:00 pm

    In the TOAD SQL buffer:

    DECLARE
       v_sql VARCHAR2(255);
       v_return VARCHAR2(255);
    BEGIN
       v_sql := 'the string'; -- or get it from anywhere else
       v_return := HPQ_IF.def.abc(v_sql);
       dbms_output.put_line(v_return);
       -- do anything else you want to do with the return value here...
    END;
    

    If you don’t want to do anything with the return value other than display the information:

    SELECT HPQ_IF.def.abc('the string') FROM DUAL;
    

    However, for a PL/SQL function to be called in SQL (SELECT, INSERT, etc), it must be free from certain side effects (ie. it can’t modify certain kinds of state within the database). To be called as a column in a SELECT, it must not modify the database (insert or update, for example), perform DDL, or commit a transaction.


    You can also use Execute Procedure from within the Schema Browser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is it possible to have a User Defined Type inside Oracle package definition? When
I have a PL/SQL package in an Oracle 10g database and I want to
Lucky me, I have to work with Oracle. And packages. I have a package
I have an Oracle database backup file (.dmp) that was created with expdp .
We have an Oracle type that's declared as such: CREATE OR REPLACE TYPE its_accountarray;
I have a query that I am generating the XML from in Oracle using
i had the problem that i downloaded the JTS package from oracle's java page
Oracle Forms provides a PL/SQL package named JNI to interact with Java. Does anyone
I have an SSIS package (SQL 2008) that I need to connecto to an
I have a problem with Oracle Spatial Network package. I'm creating NODE, LINK and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.