Problem in converting Long Raw to Varchar2

Hi
I need to analyze the contents of a 'Long Raw ' field to proceed further. In an attempt to do that, using the following code, I could not see the data in a readable format.Kindly Help...
create or replace procedure lr2vc1 (lv_id number) is
c1 long raw;
note_varchar2 varchar2(32000);
begin
select value into c1 from Test_table where id=lv_id; /*value is the Long Raw field*/
note_varchar2 := utl_raw.cast_to_varchar2(c1);
insert into lr2vc (prid,lrvalue) values (lv_id, note_varchar2);
commit;
--dbms_output.put_line(c1);
end;
Thanks
Sandeep

Whats wrong with the answer given here?:
<br>
Problem while converting Long Raw data to Varchar2

Similar Messages

  • How can I converting long raw in clob on Apex when I'm creating a view?

    I need some help. I'm creating a view and I need converting long raw fields in clob, varchar2, or char when I create a view.
    Thanks for your help.

    What error did you get when using the functions in a SELECT on a view? If that did not work, identify the table the view is based on and write the SELECT statement directly against that table and not the view.
    I do not understand, "I try and they are rights".
    Mike

  • Problem getting a LONG RAW value

    Hi,
    I cannot make this code work:
    OracleCommand cmd = new OracleCommand("ABC$MYPACKAGE.GetLogo", new OracleConnection(_constr));
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.InitialLONGFetchSize = -1;
    cmd.Connection.Open();
    cmd.BindByName = true;
    OracleParameter p = cmd.Parameters.Add("parameter_no1", OracleDbType.Decimal);
    p.Value = 10549923;
    p.Direction = ParameterDirection.Input;
    p = cmd.Parameters.Add("parameter_no2", OracleDbType.Decimal);
    p.Value = 656427;
    p.Direction = ParameterDirection.Input;
    p = cmd.Parameters.Add("RETCURSOR", OracleDbType.RefCursor);
    p.Direction = ParameterDirection.Output;
    OracleDataReader reader = cmd.ExecuteReader();
    if (reader.Read())
    ... code here ...
    cmd.Connection.Close();
    It keeps throwing AccessViolationException when executing the reader.Read() statement.
    The only value the ref cursor returns is a LONG RAW, but it fails even before I try to access that through the reader. I cant seem to find the problem!
    regards,
    Carl

    Can you try out changing ExecuteReader to ExecuteNonQuery and get OracleDataReader from the OracleRefCursor stored in p.Value?
    Something like -
    cmd.ExecuteNonQuery();
    OracleRefCursor cur = p.Value;
    OracleDataReader reader = cur.GetDataReader();

  • Problem with converting GF1 raw files

    I recently bought a Panasonic Lumix GF1 and use raw. However, my CS3 and Element 6.0 is not able to read the DNG files that I have created through Adobe DNG Converter. It doesn't seem to matter that I updated the Converter to 6.3. It creates DNG files, but none of my image processing soft ware can deal with them.
    I have also used a Canon G11 for almost a year and converted the CR2 raw files without problem.
    Please help me! Anyone!

    New problem discovered: My RW2 files of about 11-12 MB are converted to 40-41 MB DNG files. How is this possible?

  • Issue with Oracle LONG RAW data type

    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /

    Maddy wrote:
    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /below might work
    12:06:23 SQL> help copy
    COPY
    Copies data from a query to a table in the same or another
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                {APPEND|CREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[/password]@connect_identifier

  • Long Raw Picture not showing in adf

    I have used following servlet to show long raw picture. the problem is in line
    Blob blob = rs.getBlob("PLAN_PIC"); 
    The oracle column is Long Raw  and in ADF table this column shows as Raw. I have tried to use Raw class but could not identify proper functions. For example I used      Long blob=rs.getLong("PLAN_PIC"); it is ok but then how to get its buffered binary stream because getBinaryStream() does not work for long. I also tried to use to_blob function to convert long raw column to blob but it also gives ora-0932 error. The same table shows picture in oracle form and also Dot Net developer showed the same picture. Kindly help.
    //servlet code is
    public class imageservlet extends HttpServlet {
       // private static final String CONTENT_TYPE = "text/html; charset=UTF-8";   ( I checked both content types but nothing)
          private static final String CONTENT_TYPE =   "image/jpg; charset=utf-8";
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response) throws ServletException,
                                                               IOException {
            response.setContentType(CONTENT_TYPE);
            String imageId = request.getParameter("id");
           // String imageId="4000";
            OutputStream os = response.getOutputStream();
            Connection conn = null;
            try {
                Context ctx = new InitialContext();
                //Datasource as defined in <res-ref-name> element of weblogic.xml
                DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/DYEDS");
                conn = ds.getConnection();
                PreparedStatement statement =
                    conn.prepareStatement("SELECT plan_no, plan_pic " +
                                          "FROM tblplanpics " +
                                          "WHERE plan_no = ?");
               // statement.setInt(1, new Integer(imageId));
                statement.setString(1,imageId);
                ResultSet rs = statement.executeQuery();
                if (rs.next()) {
                   Blob blob = rs.getBlob("PLAN_PIC");     
                    BufferedInputStream in =
                        new BufferedInputStream(blob.getBinaryStream());
                    int b;
                    byte[] buffer = new byte[10240];
                    while ((b = in.read(buffer, 0, 10240)) != -1) {
                        os.write(buffer, 0, b);
                    os.close();
            } catch (Exception e) {
                System.out.println(e);
            } finally {
                try {
                    if (conn != null) {
                        conn.close();
                } catch (SQLException sqle) {
                    System.out.println("SQLException error");

    The answers are the same as in your other thread https://forums.oracle.com/thread/2591893 about this issue.
    Timo

  • How to convert   (pdf raw data) binary to (bitmap/TIFF) image.

    Dear gurus,
    I'm facing a problem to converting my raw data(binary), which i got from my uploaded PDF file.  I try a few methods from SDN itself to make the raw file can be download to my local PC as images.
    I already try to download the raw data, directly using FM GUI_DOWNLOAD, even though it is successfully downloaded to my local drive, but the file still cannot be opened. I debug a few program, which is use to download the bitmap inside the SAP directories to local directory but when i compared both debug data it's something differently written.
    Is there any other way for me to solve this problem? It's there the a way for me to convert the PDF's raw data into bitmap first, before change convert them to binary and download them to my local drive?
    Helping is a rewards. Thanks a lot.
    Edited by: muhamad husin on Mar 25, 2008 5:55 AM

    HI,
    Try this Standard program
    RSTXLDMC  -->    Uploading TIFF Files to SAPscript Texts
    Regrads,
    S.Nehru

  • Migrating LONG RAW to BLOB and optimizing extent size

    Hi all,
    I got a quite fragmented table with a LONG RAW column I want to migrate to BLOB and defragment.
    DB version is Oracle9i Release 9.2.0.4.0 and this is a production environment.
    I know MOVE and/or CTAS are not possible with LONG RAW columns
    So, how can I do that? Is ALTER TABLE MODIFY the only possibility to migrate from LOING RAW to BLOB?
    Since ALTER TABLE MODIFY will lock the whole table preventing any DML operation, I need at least a rough estimate of the time needed for this operation. How can I do that?
    Since this table is quite fragmented, I also want to rebuilt it using a different extent size.
    I think I should issue a ALTER TABLE MOVE... after having performed the "ALTER TABLE MODIFY".
    Can I do something better to minimize unavailability to DML operations?
    thanks,
    andrea

    Hi,
    Is this an OCCI question?
    I don't see that "to_blob" is documented anywhere. The "to_lob" function can be used to convert long raw columns, but its use is pretty specific and certainly not for general query use.
    Regards,
    Mark
    EDIT1: Well, my local documentation set does not have "to_blob" in it at all. However, it is in the 11.1 SQL Language Reference on OTN:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions186.htm#sthref2358
    Despite the fact that the documentation mentions "long raw" the function appears to only work with "raw" data in my 11.1 tests.
    What's your goal here?
    Edited by: Mark Williams on Jun 8, 2009 7:15 PM

  • Convert long to varchar2

    Hi there,
    I am looking for a convertion, long to varchar2, in a sql statement.
    If I run the following query :
    select data_default from user_tab_columns
    It works fine in sql developper but when I execute it in my PHP code it returns:
    Notice: Undefined index: DATA_DEFAULT in /opt/lampp/htdocs/datamodel/index.php on line 64
    This issue is due in the case where the columns has null.
    So I try with the NVL function:
    select nvl(data_default, 'null') from user_tab_columns
    ORA-00932: inconsistent datatypes: expected LONG got CHAR
    I found on internet some people are using the substr function but it did not working for me.
    select substr(data_default, 1, 2000) from user_tab_columns
    ORA-00932: inconsistent datatypes: expected NUMBER got LONG
    Any one has an idea ?
    Regards !

    See this thread as well you can get an exaple user function
    ORA-00932: inconsistent datatypes
    G.

  • PL/SQL Solution for Converting Long to VarChar2

    I recently had to convert a bunch of text stored in Long fields to a new VarChar2(2000) field in the same table.
    As you know if you've ever tried, you can't use a basic SQL the update statement will not do this, e.g. update table1 set field2 = field1 (where field2 is VarChar(2000) and field1 is Long) fails as does update table1 set field2 = substr(field1, 1, 2000).
    Interestingly PL/SQL's implementation of SubStr does work with Long fields. I was able to put together the following anonymous PL./SQL block to accomplish the task (msgtext is varchar(2000), msgtext2 is Long):
    DECLARE
    CURSOR message_cur
    IS
    SELECT ROWID, msgtext, msgtext2
    FROM tlrcmmessages
              FOR UPDATE;
    message_rec message_cur%ROWTYPE;
    BEGIN
    OPEN message_cur;
    LOOP
    FETCH message_cur
    INTO message_rec;
    EXIT WHEN message_cur%NOTFOUND;
    UPDATE tlrcmmessages
    SET msgtext = SUBSTR(message_rec.msgtext2, 1, 2000)
    WHERE CURRENT OF message_cur;
    END LOOP;
    CLOSE message_cur;
    END;
    I hopes this helps others out there in similar circumstances.
    Good luck,
    Rob Bratton, Bratton Enterprises

    Oracle strongly recommends to convert LONG fields into CLOB:
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96590/adfnstyp.htm#429091
    Rgds.

  • I have just purchased elements 12. It will not convert a raw file for me. i have downloaded DNG convertor 8.5 but it says that my Canon 70d is not compatible. I never had a problem with my last camera canon 7d and elments 8. Can someone help me please..

    i have just purchased elements 12. It will not convert a raw file for me. i have downloaded DNG convertor 8.5 but it says that my Canon 70d is not compatible. I never had a problem with my last camera canon 7d and elments 8. Can someone help me please

    Did you buy PSE in the mac app store? If not, just go to Help>Updates in the editor and update camera raw and you should be able to open the raw files in PSE 12 directly without the DNG converter.

  • Limitation of converting from Long Raw to Blob

    Hi All,
    DB:11g
    Oracle Apps:R12
    Is there a limitation of converting from Long Raw to Blob?
    Please share your experience on this subject in case anyone has faced it before.
    Thanks for your time!
    Regards,

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:510622111991

  • OdbcDataReader + LONG RAW problem

    Hi,
    I'm trying to get picture data stored in long raw field with odbcdatareader (with CommandBehaviour.SequentialAccess).
    But when i read data, GetBytes function always return 0.
    What can i do ?
    while(dr.Read())
    retval = dr.GetBytes(0,startIndex,buffer,0,bufferSize);
    while(retval == bufferSize)
    startIndex += bufferSize;
    retval = dr.GetBytes(0,startIndex,buffer,0,bufferSize);          
    }

    I haven't worked specifically with long raw and JDBC.
    There is a bug in the Oracle 9i OCI driver that limits the insert size of long raw to 50k. Are you using the OCI driver? Can you try the thin driver?
    Oracle has a 32k limit on the server side internal driver for long raw.
    I have seen documentation on a 32k limit returned when accessing / inserting long raw in PL/SQL. Is it possible that the message is being returned from the SP rather then as an issue with the driver (i.e. maybe you could stream a long raw > 32k directly and not go through an SP)?
    Do you have to use long raw? Can you use one of the LOB types? If you can move to an LOB type you should.
    Not as much help as you probably need. If you have to stay with long raw, perhaps someone with JDBC long raw experience will see your post and help out.

  • Problems with LONG RAW column

    We have a LONG RAW column.
    JDev mapped it to Raw and LONGVARBINARY as SQL type.
    Reading data (even huge amounts) works alright, but when we try to insert or update we get:
    Data size bigger than max size for this type
    I did some reading on the internet and found that I had to stream data into JDBC which Raw apparently cannot handle.
    So how can I solve this?
    And please, don't just write "Create a domain". I tried. It's not that easy for me. It should be a bit more specific.
    Thanks in advance!
    Sascha

    You not only have to create a Domain but also implement either BlobDomainInterface or one of it's subclassed interfaces.
    See oracle.jbo.domain.BlobDomainInterface (source in bc4jdomorcl-src.zip) for an example of how various interface methods are implemented.
    When a domain implements BlobDomainInterface, it's called during load/save Entity data to setup it's transaction context (if it needs to during load) and to save it's content into the db using the given transaction context.
    These interfaces are written with the assumption that there's an oracle.sql.* class that knows how to use transaction to fetch data using SQL-locator objects. In this case I believe you will need to extend the domain from oracle.sql.RAW class.

  • PL/SQL Help...Long Raw to BLOB

    Hello All,
    I have a PL/SQL Package and Function that does a search for text in a blob field. Below is the Package and the Function.
    Here the statement that executes the function
    Select *
               FROM PROGTXT
              WHERE pcode.str_loc_in_blob
                                        (pcode.blob_to_new_blob (progtxt),
                                         '<search string>'
                                        ) <> 0
           ORDER BY objectvalue1, objectvaluesCurrently the above mentioned sql works where the progtxt is a blob datatype.
    We have a database where the progtxt is of Long Raw datatype. I want to utilize the same sql exactly but change the function where i can copy the table structure to a global temporary table each time the function is executed using the dbms_lob funtion and delete the temp table once the function is executed after the results are posted/retrieved. The reason why i want to use the same application is because it is part of a .net program and the only thing i change is the function. I am not great with PL/SQL. If anyone can help that will be a great help!!!!!
    Below is the code for the package and the function
    CREATE OR REPLACE PACKAGE PCODE AS
    FUNCTION to_base (p_dec IN NUMBER, p_base IN NUMBER)
       RETURN VARCHAR2
    FUNCTION to_dec (
       p_str         IN   VARCHAR2,
       p_from_base   IN   NUMBER DEFAULT 16
       RETURN NUMBER
    FUNCTION to_hex (p_dec IN NUMBER)
       RETURN VARCHAR2
    FUNCTION to_bin (p_dec IN NUMBER)
       RETURN VARCHAR2
    FUNCTION to_oct (p_dec IN NUMBER)
       RETURN VARCHAR2
    FUNCTION str_to_hex(p_str IN VARCHAR2)
    RETURN VARCHAR2
    FUNCTION str_loc_in_blob(
      l_blob IN BLOB
    , l_str  IN VARCHAR2)
    RETURN NUMBER
    FUNCTION blob_to_new_blob(
      p_blob IN BLOB)
    RETURN BLOB
    END PCODE;
    CREATE OR REPLACE PACKAGE BODY PCODE AS
    FUNCTION to_base (p_dec IN NUMBER, p_base IN NUMBER)
       RETURN VARCHAR2
    IS
       l_str   VARCHAR2 (255) DEFAULT NULL;
       l_num   NUMBER         DEFAULT p_dec;
       l_hex   VARCHAR2 (16)  DEFAULT '0123456789abcdef';
    BEGIN
       IF (p_dec IS NULL OR p_base IS NULL)
       THEN
          RETURN NULL;
       END IF;
       IF (TRUNC (p_dec) <> p_dec OR p_dec < 0)
       THEN
          RAISE PROGRAM_ERROR;
       END IF;
       LOOP
          l_str := SUBSTR (l_hex, MOD (l_num, p_base) + 1, 1) || l_str;
          l_num := TRUNC (l_num / p_base);
          EXIT WHEN (l_num = 0);
       END LOOP;
       RETURN l_str;
    END to_base;
    FUNCTION to_dec (
       p_str         IN   VARCHAR2,
       p_from_base   IN   NUMBER DEFAULT 16
       RETURN NUMBER
    IS
       l_num   NUMBER        DEFAULT 0;
       l_hex   VARCHAR2 (16) DEFAULT '0123456789abcdef';
    BEGIN
       IF (p_str IS NULL OR p_from_base IS NULL)
       THEN
          RETURN NULL;
       END IF;
       FOR i IN 1 .. LENGTH (p_str)
       LOOP
          l_num :=
             l_num * p_from_base + INSTR (l_hex, UPPER (SUBSTR (p_str, i, 1)))
             - 1;
       END LOOP;
       RETURN l_num;
    END to_dec;
    FUNCTION to_hex (p_dec IN NUMBER)
       RETURN VARCHAR2
    IS
    BEGIN
       RETURN to_base (p_dec, 16);
    END to_hex;
    FUNCTION to_bin (p_dec IN NUMBER)
       RETURN VARCHAR2
    IS
    BEGIN
       RETURN to_base (p_dec, 2);
    END to_bin;
    FUNCTION to_oct (p_dec IN NUMBER)
       RETURN VARCHAR2
    IS
    BEGIN
       RETURN to_base (p_dec, 8);
    END to_oct;
    FUNCTION str_to_hex(p_str IN VARCHAR2)
    RETURN VARCHAR2 IS
    l_val VARCHAR2(2000) := NULL;
    BEGIN
       FOR i IN 1 .. LENGTH (p_str)
       LOOP
          l_val := l_val || to_hex(ASCII(SUBSTR (p_str, i, 1))) || case when i = LENGTH (p_str) then null else '00' end;
       END LOOP;
       RETURN UPPER(l_val);
    END str_to_hex;
    FUNCTION str_loc_in_blob(
      l_blob IN BLOB
    , l_str  IN VARCHAR2)
    RETURN NUMBER IS
    blob_len NUMBER;
    l_pos number := 0;
    BEGIN
    blob_len := dbms_lob.getlength(l_blob);
    l_pos := 0;
    FOR i in 0..15 LOOP
        l_pos := dbms_lob.instr(DBMS_LOB.SUBSTR (l_blob, 2000, i*2000+1), IMPACTUS_PCODE.str_to_hex((l_str)));
        IF l_pos <> 0 THEN
           RETURN i*2000+1 + l_pos - 1;
        END IF;
    END LOOP;
    FOR i in 0..15 LOOP
        l_pos := dbms_lob.instr(DBMS_LOB.SUBSTR (l_blob, 2000, i*2000+1), IMPACTUS_PCODE.str_to_hex(upper(l_str)));
        IF l_pos <> 0 THEN
           RETURN i*2000+1 + l_pos - 1;
        END IF;
    END LOOP;
    l_pos := 0;
    FOR i in 0..15 LOOP
        l_pos := dbms_lob.instr(DBMS_LOB.SUBSTR (l_blob, 2000, i*2000+1), IMPACTUS_PCODE.str_to_hex(lower(l_str)));
        IF l_pos <> 0 THEN
           RETURN i*2000+1 + l_pos - 1;
        END IF;
    END LOOP;
    l_pos := 0;
    FOR i in 0..15 LOOP
        l_pos := dbms_lob.instr(DBMS_LOB.SUBSTR (l_blob, 2000, i*2000+1), IMPACTUS_PCODE.str_to_hex(initcap(l_str)));
        IF l_pos <> 0 THEN
           RETURN i*2000+1 + l_pos - 1;
        END IF;
    END LOOP;
    RETURN 0;
    END str_loc_in_blob;
    FUNCTION blob_to_new_blob(p_blob BLOB)
       RETURN BLOB IS
    v_file_blob     BLOB;  
    v_file_blob_new BLOB := NULL;
    v_file_clob     CLOB;  
    v_file_size     INTEGER := dbms_lob.lobmaxsize;
    v_dest_offset   INTEGER := 1;
    v_src_offset    INTEGER := 1;
    v_blob_csid     NUMBER := dbms_lob.default_csid;
    v_lang_context  NUMBER := dbms_lob.default_lang_ctx;
    v_warning       INTEGER;
    BEGIN
    DBMS_LOB.CREATETEMPORARY(v_file_clob, TRUE);
            dbms_lob.convertToClob(
                            v_file_clob,
                            p_blob,
                            v_file_size,
                            v_dest_offset,
                            v_src_offset,
                            v_blob_csid,
                            v_lang_context,
                            v_warning);
            v_file_clob:=upper(v_file_clob);
            IF v_warning = 0 THEN
                    v_file_size     := dbms_lob.lobmaxsize;
                    v_dest_offset   := 1;
                    v_src_offset    := 1;
                    v_blob_csid     := dbms_lob.default_csid;
                    v_lang_context  := dbms_lob.default_lang_ctx;
                    v_warning       := null;
                    DBMS_LOB.CREATETEMPORARY(v_file_blob_new,true);
                    dbms_lob.convertToBlob(
                            v_file_blob_new,
                            v_file_clob,
                            v_file_size,
                            v_dest_offset,
                            v_src_offset,
                            v_blob_csid,
                            v_lang_context,
                            v_warning);
                    IF v_warning = 0 THEN
                       RETURN v_file_blob_new;
                    END IF;  
            END IF;
    END;
    END PCODE;
    /Thanks
    Nitin
    Edited by: user13048604 on Jan 12, 2011 10:18 PM

    First you may need to convert 'BLOB' which is of 'RAW' type to 'VARCHAR2'
    using
    utl_raw.cast_to_varchar2(urblob)Then you can make use of dbms_lob.instr,dbms_lob.substr etc...

Maybe you are looking for

  • SVG Tutorial

    Hello everybody, I tried to complete the Tutorial-Weglog "How to Generate and Display SVG Graphics in ABAP, Part 1" by Siarhei Ulasenka. unfortunately when I tried to test the logo.htm I get the error message "Konnte nicht auf Datei zugreifen" (engli

  • KM Navigation iview not showing contents

    Hi,    I am using the KM Navigation iview to show contents in the desktop innerpage below detailed Navigation.When the propert 'height type = Automatic' its not showing any content its showing a single white line.But when i change the 'hieght type= F

  • Link to another page

    Here's how I've got it set up; Two master pages, a home page and an intro page. Intro page feeds off of Master - B, all other pages feed off of Master - A. I want a button on the Intro page to link to the Home page. How can this be done? I'm trying t

  • Duplicating a database using FRA

    Hello, I'm trying to duplicate a database using a backupset stored in FRA. However, I thought rman would go take the most recently backupset that I'd backed up but isn't what's happening. It's trying read backup piece from tape and this is what I don

  • Nokia 6680 new firmware?

    Hi guys, Did Nokia realese new firmware for Nokia 6680?: v5.04.40 20-11-06 RM-36 I was just checking for the new firmware for Nokia 6680, via Nokia Software Updater. And I was surprise to find there are new updates. Then I upgrade my 6680 from v5.04.