Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Posts
    2

    Unanswered: Problem in inserting String into clob field

    Hi All,

    I have a long .log file where i need to inert into the CLOB field of oracle table.
    I am inserting the log file after i convert it into string.

    But i am getting the following error.

    ERROR:
    ORA-01756: quoted string not properly terminated


    SP2-0734: unknown command beginning "+ ReturnSt..." - rest of line ignored.
    SP2-0734: unknown command beginning "+ [ 0 -ne ..." - rest of line ignored.
    SP2-0734: unknown command beginning "+ myJobRun..." - rest of line ignored.
    SP2-0734: unknown command beginning "+ br_Updat..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0552: Bind variable "PLS" not declared.
    SP2-0734: unknown command beginning "PL/SQL pro..." - rest of line ignored.
    SP2-0734: unknown command beginning "+ ReturnSt..." - rest of line ignored.
    SP2-0734: unknown command beginning "+ [ 0 -ne ..." - rest of line ignored.
    SP2-0734: unknown command beginning "+ myJobRun..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning "+ br_Updat..." - rest of line ignored.
    ERROR:
    ORA-01756: quoted string not properly terminated


    I have that log file in my unix file server i am trying to insert through unix shell script.

    Code:


    br_Update_Proxy_Job_Run_Status()
    {
    typeset -i myArgCount=$#

    if [ $myArgCount -lt 2 ]
    then
    br_PrintMessage W \
    "NOT Enough aruments for the function br_Update_Proxy_Job_Run_Status? $Bell"
    return $BR_WARNING_STATUS
    fi

    typeset myFile=""
    typeset myJobRunStatusMsg="$1"
    typeset -i myRunStatusId="$2"
    typeset -i myRptTotalInsertedETL="$3"
    typeset -i myRptTotalUpdatedETL="$4"
    typeset -i myRptTotalErrorETL="$5"
    typeset myLogFile="$8"

    if [ -z "$8" ]
    then
    myFile=""
    else
    myFile=`cat $myLogFile | sed "s/\'/''/g"`
    fi

    sqlplus -s $DBCredentials <<-EndOFSQL

    SET DEFINE OFF;
    SET SERVEROUT ON

    DECLARE
    i_run_status_id VARCHAR2(100) := $myRunStatusId;
    i_end_time VARCHAR2(1000);
    i_total_errors NUMBER := $myRptTotalErrorETL;
    i_total_warnings VARCHAR2(1000);
    i_total_inserted NUMBER := $myRptTotalInsertedETL;
    i_total_updated NUMBER := $myRptTotalUpdatedETL;
    i_total_rejected NUMBER := 0 ;
    i_log_file CLOB := TO_CLOB('$myFile');
    i_job_run_message VARCHAR2(512) := '$myJobRunStatusMsg';
    i_modlast_by VARCHAR2(1000);
    o_sqlcode NUMBER := 0 ;
    o_sqlmsg VARCHAR2(1000);
    BEGIN
    $USP_UPD_JOB_RUN_STATUS
    (
    i_run_status_id,
    i_end_time,
    i_total_errors,
    i_total_warnings,
    i_total_inserted,
    i_total_updated,
    i_total_rejected,
    i_log_file,
    i_job_run_message,
    i_modlast_by,
    o_sqlcode,
    o_sqlmsg
    );


    END;
    /
    EndOFSQL

    }


    Please help its very urget.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Please help its very urget.
    Why is it urgent for me to solve this problem for you?

    When was the last time this worked?
    What changed?

    use CUT & PASTE to show us what happened to produce posted message
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •