PL/SQL (MOSC)

MOSC Banner

11gR2 : Character '^M' generated with BLOB

edited Oct 10, 2013 5:03AM in PL/SQL (MOSC) 4 commentsAnswered
Hi ,

I have '^M' character in each end of line in file generated on Unix server by the following procedure . Why ? How to avoid it ?

Best regards.

GD.                        


-- Find BLOB value
SELECT c_blob    -- BLOB COLUMN
INTO    v_blob
FROM    T
WHERE < condition>  ;

-- Open file

    v_file := UTL_FILE.fopen('Myfile','w', 32767);  -- v_file UTL_FILE.FILE_TYPE

-- Read BLOB value

    DBMS_LOB.read(v_blob, 32767, 1, v_buffer); -- v_buffer RAW(32767)  and v_blob BLOB

-- Write file

    UTL_FILE.put_raw(v_file, v_buffer, TRUE); 

-- Close file

    UTL_FILE.fclose(v_file);

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center