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 9270061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:16:44+00:00 2026-06-18T15:16:44+00:00

I have created a function which return NUMBER type in a package, but not

  • 0

I have created a function which return NUMBER type in a package, but not declare this function in the Package Specification.

I am calling this function in SQL query in anther function with in same package body. I am getting error.

When i declare function in Package Specification Then its fine & working.

I want to know reason behind it. Please anybody explain it.

  • 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-06-18T15:16:45+00:00Added an answer on June 18, 2026 at 3:16 pm

    Nothing to do with forward declaration at all.

    This deals with the fact that you are using a SQL query to call the function. It seems like when using a statement to invoke a function, you are no longer inside the scope of the PL/SQL package, thus you can only call publicly available functions.

    As for the why, I can only guess, so don’t take it as granted, but PL/SQL and SQL have different engines. So, when doing a sql query, even inside your pl/sql package, you go to the level of SQL where it’ll check again the permissions according to the SQL engine. So it has no idea it is executed from within a PL/SQL package and you should be allowed to call the private function.

    I think the difference of engines can be checked easily, try to use a varchar2 of 32000, it’ll work within your pl/sql function. Now, if you call your pl/sql function returning a varchar2(32000), it’ll fail. Thi is a problem I ran into, but I don’t have any databse to give you a snippet.

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

Sidebar

Related Questions

Using xlwDotNet, I have created a simple function which returns one number. Sometimes, something
I have created a function which gets an encoded string (possibly UTF-16 not sure)
I have a function which creates an object of values, but im getting this
I have created a function which has a reasonably large number of parameters (all
I have created this javascript which generates a random number ranging from 0-20. What
I have a function which returns array and I am calling this function from
I have a function to create a pdf which should return bitarray. Below is
I have created an utility function which I include in almost all Javascript code
I have created a JS function which executes fine when it's included an the
I have created a add input field function which is working fine. I would

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.