Hi Tom,
I have a package as follows:
create or replace PACKAGE SEND_MAIL_PKG as
procedure html_email(
p_to in varchar2,
p_from in varchar2,
p_subject in varchar2,
p_text in clob,
p_html in clob,
p_smtp_hostname in varchar2,
p_smtp_portnum in varchar2,
p_attachment_name varchar2 default null,
p_critical in boolean default false);
procedure html_email(
p_to in varchar2,
p_from in varchar2,
p_subject in varchar2,
p_text in varchar2,
p_html in varchar2,
p_smtp_hostname in varchar2,
p_smtp_portnum in varchar2,
p_attachment_name varchar2 default null,
p_critical in boolean default false);
procedure html_email(
p_to in varchar2,
p_from in varchar2,
p_subject in varchar2,
p_text in clob,
p_html in clob,
p_attachment_name varchar2 default null,
p_critical in boolean default false);
procedure html_email(
p_to in varchar2,
p_from in varchar2,
p_subject in varchar2,
p_text in varchar2,
p_html in varchar2,
p_attachment_name varchar2 default null,
p_critical in boolean default false);
end SEND_MAIL_PKG;
/
I am calling this package with the following code where all parameters are non null varchar2 types:
send_mail_pkg.html_email(
l_to,
l_from,
l_subject,
l_text,
l_html
);
I get the error:
Error(46,5): PLS-00307: too many declarations of 'HTML_EMAIL' match this call
The problem is that Oracle is doing an implicit conversion between varchar2 and clob. I tried converting l_text and l_html to clob but faced the same issue. Also tried to cast the type but got error "Expression is on wrong type"
Any Ideas on what is missing here ?