Skip to content
March 20, 2013 / doganay

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


Problem:

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


While:

Trying to print a boolean variable.

You get the same error when tring to to_char or to_number:

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


Solution:

declare
a number;
b boolean;
begin
a:=1;
b:=function_to_return_boolean(a);
dbms_output.put_line(
case
when b then 'TRUE'
when b is null then 'NULL'
else 'FALSE'
end
);
end;
/
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: