?
Solved

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

Posted on 2009-04-02
2
Medium Priority
?
281 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
Milleniumaire earned 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
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 syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to recover a database from a user managed backup
Suggested Courses

801 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