TechFundu

  • Increase font size
  • Default font size
  • Decrease font size
Welcome Guest,  Login | Join Now
Home Forum

compilation error for dbms_output.put_line(boolean)
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: compilation error for dbms_output.put_line(boolean)
#46
compilation error for dbms_output.put_line(boolean) 2 Years, 6 Months ago Karma: 0
Hi, I want to check boolean variables value in my PL/SQL code but it gives me compilation error.

If I use dbms_output.put_line(boolean) then it give me below error :

PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'

and if use dbms_output.put_line('Boolean:' || boolean) then I get below error :

PLS-00306: wrong number or types of arguments in call to '||'

Any idea how to solve this problem?

Thanks for help.
dnegi
Fresh Boarder
Posts: 17
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#49
Re:compilation error for dbms_output.put_line(boolean) 2 Years, 6 Months ago Karma: 0
Unfortunately you can't print boolean value directly in Pl/Sql

You can do like below..

somevariable Boolean;

if (somevariable) then
dbms_output.put_line('somevariable true');
else
dbms_output.put_line('somevariable false');
end if;
rpawar
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#51
Re:compilation error for dbms_output.put_line(boolean) 2 Years, 6 Months ago Karma: 0
Okay, I understand now..

Thanks for help...
dnegi
Fresh Boarder
Posts: 17
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
Follow us on Twitter