ORA-12703:不支持此字符集转换

时间:2016-03-12 03:55:12

标签: oracle email plsql

运行以下代码时遇到转换错误消息:

Declare
v_t MyType;
assignment_param        NVARCHAR2(10);
project_name_param      NVARCHAR2(100);
document_nick_name_param    NVARCHAR2(100);
doc_created_by          NVARCHAR2(100);
id              NVARCHAR2(10);
project_launch_date     NVARCHAR2(100);
assignment_type_param   NVARCHAR2(100);
temp                    NVARCHAR2(30000);
Begin
        assignment_param := get_assignment_type(f_id);
        project_name_param := get_project_name(f_id);
        document_nick_name_param := get_document_nick_name(f_id);
        doc_created_by := get_doc_created_by(f_id);
        id := get_id(f_id);
        project_launch_date := get_project_launch_date(f_id);
        IF (assignment_param = 'manual') THEN
            assignment_type_param := 'manually';
        ELSE
             assignment_type_param := 'automatically';
        END IF;
        v_t := MyType();
        v_t.EXTEND(7);
        v_t(1) := 'assignment_param='||assignment_param;
        v_t(2) := 'project_name_param='||project_name_param;
        v_t(3) := 'document_nick_name_param='||document_nick_name_param;
        v_t(4) := 'doc_created_by='||doc_created_by;
        v_t(5) := 'id='||id;
        v_t(6) := 'project_launch_date='||project_launch_date;
        v_t(7) := 'assignment_type_param='||assignment_type_param;
        temp := Replace_Email_Body_Contents(12,v_t);
End;

我的其他功能也有代码:

CREATE OR REPLACE FUNCTION Replace_Email_Body_Contents
(
    id_inparam IN NUMBER,
    replace_var_loop IN MyType
)
RETURN NVARCHAR2
AS
    db_string NVARCHAR2(10000);
    str_1 NVARCHAR2(100);
    str_2 NVARCHAR2(100);
BEGIN
    --loading the email template from html string column of form_templates_data table;
    SELECT HTML_STRING INTO db_string FROM TABLE WHERE ID = id_inparam;

    FOR i IN 1..replace_var_loop.COUNT LOOP           
      SELECT SUBSTR(replace_var_loop(i), 0, INSTR(replace_var_loop(i), '=')-1) INTO str_1  FROM DUAL;
      SELECT SUBSTR(replace_var_loop(i),  INSTR(replace_var_loop(i), '=')+1) INTO str_2 FROM DUAL;

      db_string := REPLACE(db_string , str_1 , str_2 );

    END LOOP;
    dbms_output.put_line(db_string);

      RETURN db_string;
END;
/

错误:

  

ORA-12703:不支持此字符集转换   ORA-06512:在“REPLACE_EMAIL_BODY_CONTENTS”,第13行   ORA-06512:第32行

HTML_STRING是上面代码中引用的表中的一列,与f_id对应的值如下所示:

通知
你好,

您已为assignment_param分配了一个文档。

项目名称: project_name_param
文件昵称: document_nick_name_param

Doc Created By: doc_created_by
LCA ID: lca_id
项目启动日期: project_launch_date


根据对清单的评估,工程师已经分配了assignment_type_param以与项目团队合作。

0 个答案:

没有答案