Solved

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

Posted on 2009-04-02
2
275 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
Comment Utility
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
Comment Utility
Simple Solution For A Complex Problem!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now