• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

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

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
gram77
Asked:
gram77
1 Solution
 
MilleniumaireCommented:
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
 
gram77Author Commented:
Simple Solution For A Complex Problem!
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now