thota198
asked on
PROC email contents
DECLARE
c_rc constant integer :=0;
c_reason constant varchar2(10) := 'success';
o_rc NUMBER := c_rc;
o_reason VARCHAR2(200) := c_reason;
BEGIN
o_email_subject VARCHAR2(100) := 'Your Approved Non-Standard Deal will expire in 5 days';
o_email_text CLOB := 'BOOST IS THE SECRET OF MY ENERGY';
DBMS_OUTPUT.enable(1000000 );
CQ_PDR_SEND_EMAIL_NOTIFY_P KG.get_ema il_content s(o_rc, o_reason, NULL, NULL, 'DEAL_EXPIRE_5_DAYS', 'sthota', 1, 'en-US',
'sthota@cisco.com',
'kpasam@cisco.com',
'sthota@cisco.com',
o_email_subject,
NULL,
o_email_text,
NULL,
NULL,
NULL,
NULL);
DBMS_OUTPUT.PUT_LINE(o_ema il_from ||' '||o_email_to||' '||o_email_cc||' '||o_email_text);
END;
/
im getting error
Execution (27: 26): ORA-06550: line 8, column 26:
PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "VARCHAR2" to continue.
ORA-06550: line 8, column 40:
PLS-00103: Encountered the symbol "=" when expecting one of the following:
. ( * % & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset me
c_rc constant integer :=0;
c_reason constant varchar2(10) := 'success';
o_rc NUMBER := c_rc;
o_reason VARCHAR2(200) := c_reason;
BEGIN
o_email_subject VARCHAR2(100) := 'Your Approved Non-Standard Deal will expire in 5 days';
o_email_text CLOB := 'BOOST IS THE SECRET OF MY ENERGY';
DBMS_OUTPUT.enable(1000000
CQ_PDR_SEND_EMAIL_NOTIFY_P
'sthota@cisco.com',
'kpasam@cisco.com',
'sthota@cisco.com',
o_email_subject,
NULL,
o_email_text,
NULL,
NULL,
NULL,
NULL);
DBMS_OUTPUT.PUT_LINE(o_ema
END;
/
im getting error
Execution (27: 26): ORA-06550: line 8, column 26:
PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "VARCHAR2" to continue.
ORA-06550: line 8, column 40:
PLS-00103: Encountered the symbol "=" when expecting one of the following:
. ( * % & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset me
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Initializing a blob is a bit tricky.. What exactly are you trying to store in that column? If it's a number just name the column type NUMBER instead of BLOB. If it's really a blob then the initialization would depend on what exactly are you trying to store there.
Just to make this compile clean you can init the variable to an empty blob.
Just to make this compile clean you can init the variable to an empty blob.
o_file_data BLOB := EMPTY_BLOB();
ASKER
DECLARE
c_rc constant integer :=0;
c_reason constant varchar2(10) := 'success';
o_rc NUMBER := c_rc;
o_reason VARCHAR2(200) := c_reason;
o_email_from VARCHAR2(100) := 'sthota@cisco.com';
o_email_to VARCHAR2(200) := 'kpasam@cisco.com';
o_email_cc VARCHAR2(400) := 'sthota@cisco.com';
o_email_reply_to VARCHAR2(40) :='sthota@cisco.com';
o_email_subject VARCHAR2(100) := 'Your Approved Non-Standard Deal will expire in 5 days';
o_email_text CLOB := 'BOOST IS THE SECRET OF MY ENERGY';
o_file_name VARCHAR2(100) :='TIMESNOW';
o_file_data BLOB := EMPTY_BLOB();
BEGIN
DBMS_OUTPUT.enable(1000000 );
CQ_PDR_SEND_EMAIL_NOTIFY_P KG.get_ema il_content s(o_rc, o_reason, NULL, NULL, 'DEAL_EXPIRE_5_DAYS', 'sthota', 1, 'en-US',
o_email_from,
o_email_to,
o_email_cc,
o_email_subject,
o_email_reply_to,
o_email_text,
NULL,
o_file_name,
o_file_data,
NULL);
DBMS_OUTPUT.PUT_LINE(o_ema il_from ||' '||o_email_to||' '||o_email_cc||' '||o_email_text);
END;
/
after i generated the above procedure the procedure ran successfully but the output was not generated
c_rc constant integer :=0;
c_reason constant varchar2(10) := 'success';
o_rc NUMBER := c_rc;
o_reason VARCHAR2(200) := c_reason;
o_email_from VARCHAR2(100) := 'sthota@cisco.com';
o_email_to VARCHAR2(200) := 'kpasam@cisco.com';
o_email_cc VARCHAR2(400) := 'sthota@cisco.com';
o_email_reply_to VARCHAR2(40) :='sthota@cisco.com';
o_email_subject VARCHAR2(100) := 'Your Approved Non-Standard Deal will expire in 5 days';
o_email_text CLOB := 'BOOST IS THE SECRET OF MY ENERGY';
o_file_name VARCHAR2(100) :='TIMESNOW';
o_file_data BLOB := EMPTY_BLOB();
BEGIN
DBMS_OUTPUT.enable(1000000
CQ_PDR_SEND_EMAIL_NOTIFY_P
o_email_from,
o_email_to,
o_email_cc,
o_email_subject,
o_email_reply_to,
o_email_text,
NULL,
o_file_name,
o_file_data,
NULL);
DBMS_OUTPUT.PUT_LINE(o_ema
END;
/
after i generated the above procedure the procedure ran successfully but the output was not generated
after i generated the above procedure the procedure ran successfully but the output was not generated
Of course. As I said this is only to make the code compile cleanly. To actually put the correct data, you must initialize the variable correctly. What do you want to put in the blob? What're you trying to achieve?
ASKER
c_rc constant integer :=0;
c_reason constant varchar2(10) := 'success';
o_rc NUMBER := c_rc;
o_reason VARCHAR2(200) := c_reason;
o_email_from VARCHAR2(100) := 'sthota@cisco.com';
o_email_to VARCHAR2(200) := 'kpasam@cisco.com';
o_email_cc VARCHAR2(400) := 'sthota@cisco.com';
o_email_subject VARCHAR2(100) := 'Your Approved Non-Standard Deal will expire in 5 days';
o_email_text CLOB := 'BOOST IS THE SECRET OF MY ENERGY';
o_file_name VARCHAR2(100) :='TIMESNOW';
o_file_data BLOB :=<4000>;
BEGIN
DBMS_OUTPUT.enable(1000000
CQ_PDR_SEND_EMAIL_NOTIFY_P
o_email_from,
o_email_to,
o_email_cc,
o_email_subject,
NULL,
o_email_text,
NULL,
o_file_name,
o_file_data,
NULL);
DBMS_OUTPUT.PUT_LINE(o_ema
END;
/
after changing i get this error
Execution (31: 23): ORA-06550: line 12, column 23:
PLS-00103: Encountered the symbol "<" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternatively-quoted S