Results 1 to 9 of 9

Thread: doubt

  1. #1
    Join Date
    Dec 2011
    Posts
    7

    Unanswered: doubt

    how to extract xml file from unix and store(or insert ) in a clob column

    please reply!!!!

  2. #2
    Join Date
    Dec 2011
    Posts
    7
    guys anyone plz help !!

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    XML file must reside on DB Server system
    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.

  4. #4
    Join Date
    Nov 2003
    Posts
    2,932
    Provided Answers: 12
    Quote Originally Posted by Naina27 View Post
    how to extract xml file from unix and store(or insert ) in a clob column
    Which SQL client are you using?

  5. #5
    Join Date
    Jul 2003
    Posts
    2,296
    use XMLtype CLOB column can load using an external table
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  6. #6
    Join Date
    Dec 2011
    Posts
    7

    Thumbs up

    hey guys i have found the solution,,, many thanks for ur reply,, but it worked in a very different way from all ur suggestions..
    Neways my wrk was done n the code is wrkin fine,,,

  7. #7
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    Quote Originally Posted by Naina27 View Post
    hey guys i have found the solution,,, many thanks for ur reply,, but it worked in a very different way from all ur suggestions..
    Neways my wrk was done n the code is wrkin fine,,,
    unlike your spellchecker
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

  8. #8
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    If you have a solution then post it for the use of other people.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  9. #9
    Join Date
    Dec 2011
    Posts
    7

    doubt solution

    CREATE OR REPLACE PROCEDURE load_clob_data AS
    var_file_handle utl_file.file_type;
    file_location VARCHAR2(100);
    text VARCHAR2(5676);
    var_clob CLOB;
    BEGIN
    file_location := '/ebz/apps/angol';
    var_file_handle := utl_file.fopen(file_location, 'test.xml', 'r');
    LOOP
    BEGIN
    utl_file.get_line(var_file_handle, text);
    DBMS_OUTPUT.put_line(text);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    EXIT;
    END;
    var_clob := var_clob ||text || CHR(13);
    END LOOP;
    INSERT INTO clob_tab(datetime_inserted,datetime_start,data) VALUES(to_date('12/12/2011 13:11:15','dd/mm/yyyy hh24:mi:ss'),to_date('12/12/2011 13:10:10','dd/mm/yyyy hh24:mi:ss'),var_clob);
    commit;
    utl_file.fclose(var_file_handle);
    END;
    /

Posting Permissions

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