Solved

Debugging with Boolean values:Wrong number or types of arguments in call to '||'

Posted on 2009-04-02
2
277 Views
Last Modified: 2013-12-18
When I use a boolean value with DBMS_OUTPUT.PUT_LINE is get an error.

Error is "Wrong number of types of arguments in call to '||'

This is because DBMS_OUTPUT package is not overloaded for boolean values.

How can I debug boolean values in Pl/Sql then?

***********code***********
Procedure process (p_trade_no IN number,
                   p_ellig_in IN BOOLEAN) AS

BEGIN
      DBMS_OUTPUT.PUT_LINE('value of p_ellig_in is '||p_ellig_in );
      IF p_ellig_in THEN
            null;
      END IF;

END;

Error: Wrong number or types of arguments in call to '||'
0
Comment
Question by:gram77
2 Comments
 
LVL 16

Accepted Solution

by:
Milleniumaire earned 500 total points
ID: 24048930
Try the following:

Procedure process (p_trade_no IN number,
                   p_ellig_in IN BOOLEAN) AS

BEGIN
  DBMS_OUTPUT.PUT_LINE('value of p_ellig_in is '||CASE when p_ellig_in then 'Y' else 'N' END);
      IF p_ellig_in THEN
            null;
      END IF;

END;
0
 

Author Closing Comment

by:gram77
ID: 31565747
Simple Solution For A Complex Problem!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious sideā€¦
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question