| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

12-09-11, 08:22
|
|
Registered User
|
|
Join Date: Dec 2011
Posts: 7
|
|
|
doubt
|
|
how to extract xml file from unix and store(or insert ) in a clob column
please reply!!!!
|
|

12-09-11, 08:23
|
|
Registered User
|
|
Join Date: Dec 2011
Posts: 7
|
|
|
|

12-09-11, 10:10
|
|
Registered User
|
|
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,416
|
|
|
|
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.
|
|

12-09-11, 10:56
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 2,408
|
|
Quote:
Originally Posted by Naina27
how to extract xml file from unix and store(or insert ) in a clob column
|
Which SQL client are you using?
|
|

12-10-11, 13:22
|
|
Registered User
|
|
Join Date: Jul 2003
Posts: 2,292
|
|
use XMLtype CLOB column can load using an external table
__________________
- The_Duck
you can lead someone to something but they will never learn anything ...
|
|

12-15-11, 02:31
|
|
Registered User
|
|
Join Date: Dec 2011
Posts: 7
|
|
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,,,
|
|

12-15-11, 10:32
|
|
Registered User
|
|
Join Date: Jun 2004
Posts: 597
|
|
Quote:
Originally Posted by Naina27
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.
|
|

12-15-11, 10:54
|
|
Lead Application Develope
|
|
Join Date: Jun 2004
Location: Liverpool, NY USA
Posts: 2,222
|
|
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.
|
|

02-15-12, 04:34
|
|
Registered User
|
|
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;
/
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|