Home » SQL & PL/SQL » SQL & PL/SQL » Loading a CLOB with a KEY
Loading a CLOB with a KEY [message #681161] Mon, 22 June 2020 04:04 Go to next message
Mark70
Messages: 18
Registered: June 2020
Junior Member
Hi,
I need to load by using SQL Loader, a list of CLOB into a table.
What I generally do is to have a file LIST.DAT containing the list of CLOB on the Server:
FILE1
FILE2
FILE3
and then having a ctl like this:
load data
 infile "LIST.DAT" stream
 badfile "LIST.BAD"
 append
into table MYTABLE
fields terminated by ','
trailing nullcols
(id_seq sequence(max,1),
 file_name       char(150),
 file_lob lobfile(file_name) terminated by eof
)
so as to get something like this into MYTABLE:
ID_SEQ  CLOB
1       FILE1
2       FILE2
3       FILE3
Now I need to load every CLOB with a KEY arriving externally, that is I would like to have into MYTABLE something like:
ID_SEQ   KEY    CLOB
1     	 34     FILE1
2        22     FILE2
3        78     FILE3
In this case, how should I receive for every CLOB its own KEY on the Server and how could I then load both of them?
Oracle 10g
Thank you


Re: Loading a CLOB with a KEY [message #681173 is a reply to message #681161] Mon, 22 June 2020 09:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
I need to load every CLOB with a KEY arriving externally
What does this mean EXACTLY?

Re: Loading a CLOB with a KEY [message #681174 is a reply to message #681161] Mon, 22 June 2020 09:53 Go to previous message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Michel Cadot wrote on Wed, 10 June 2020 12:25

From your previous topic:

Michel Cadot wrote on Thu, 04 June 2020 16:42

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

And as asked in your previous topic:

Michel Cadot wrote on Wed, 03 June 2020 17:58
...
Note: Always post your Oracle version, with 4 decimals (query v$version), as often solution depends on it.
A feedback in this topic would also be welcome.
And the other one too.

And the other oneS too, now.

Previous Topic: 2 Rows Data into 1 Row
Next Topic: View and Table created from same query giving different result
Goto Forum:
  


Current Time: Thu Mar 28 08:57:38 CDT 2024