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

  • SEARCH
  • Home
  • 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 4059608
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:13:52+00:00 2026-05-20T15:13:52+00:00

I am using oracle 11g and I just cant under stand where my problem

  • 0

I am using oracle 11g and I just cant under stand where my problem is.
I have made much more difficult stuff but I fail in this simple thing for the last 5 hr :

This is the function body

FUNCTION legal_user(
     level_existance  number
    ,types_with_impel number)
RETURN BOOLEAN
 IS
 v_ret_val BOOLEAN;
 BEGIN
   v_ret_val := FALSE;
   IF (level_existance*types_with_impel>0) then 
     v_ret_val := TRUE;
     DBMS_OUTPUT.PUT_LINE('true');
   else 
     DBMS_OUTPUT.PUT_LINE('false');
   END IF;       
  return v_ret_val;
END legal_user;

This is the spec :

FUNCTION legal_user(
       level_existance number
       ,types_with_impel number)
   RETURN BOOLEAN;

which does logical AND equivlant to

         A*B>0?true:false;   

The error message I am getting is

ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type
06552. 00000 – “PL/SQL: %s”
*Cause:
*Action:
Error at Line: 1 Column: 7


This is how I run it in my IDE

 SELECT compt_tree_profile_q.legal_user(1,1)
 FROM dual 
  • 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-20T15:13:53+00:00Added an answer on May 20, 2026 at 3:13 pm

    Pure SQL does not recognize a boolean type (until version 23c), although PL/SQL does. So your query does not know what datatype this function is returning..

    The function works, so you could in another pl/sql block use

    declare
    myvar boolean;
    begin
       myvar := compt_tree_profile_q.legal_user(1,1);
    end;
    

    But you can’t use this function in a pure select statement.

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

Sidebar

Related Questions

I am using Oracle 11g, and I have a lot of stored procedure code
I have an oracle 11g database. As I understand it, but have not tried
I'm using Oracle 11g R2. I have a table with 9.1 billion rows. When
We've recently updated to Oracle 11g and our DBA has suggested using result caching
I am using Oracle SQL (in SQLDeveloper, so I don't have access to SQLPLUS
I am using Oracle 9 JDBC Thin Driver - the connection string I have
At work we have just started developing in C#.NET using VS2008 and we need
Does anyone know why in Oracle 11g when you do a Count(1) with more
Perhaps this is normal, but in my Oracle 11g database I am seeing programmers
I'm Using Oracle 11g and JPA 2.0 (hibernate in JBoss 6.0.0). I need to

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.