DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: inserting CLOB from sqlplus

  1. #1
    Join Date
    Mar 2001
    Location
    south africa
    Posts
    401

    inserting CLOB from sqlplus

    how to insert data intoa lob column via sqlplus

    mytest table
    test1- number1
    test2 clob

    i know i cannot do this

    insert into mytest values(test1,'test2');

    any help is much appreciated

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Of course you cannot do that because the value test1 is not a number. String literals are OK for inserting into a clob.
    Ales
    The whole difference between a little boy and an adult man is the price of toys

  3. #3
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    In regards to your CLOB column question...

    1- You cannot directly insert a string larger than 4000 bytes in your CLOB column
    2- For a string larger than 4000 you have to call a procedure, check dbms_lob.write
    3- For a string larger than 32000 bytes you would have to loop to append data in 32K chunks, check dbms_lob.writeappend
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  4. #4
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    But you can use dbms_lob to read a flat file and load that with dbms_lob.

  5. #5
    Join Date
    Dec 2000
    Posts
    126

    check this out

    Check this link, it has the answer you're looking for


    http://asktom.oracle.com/pls/asktom/...D:367980988799

  6. #6
    Join Date
    Mar 2001
    Location
    south africa
    Posts
    401
    thank you

Posting Permissions

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


Click Here to Expand Forum to Full Width