16. april 2010 - 16:39
Der er
3 kommentarer og 1 løsning
How to update a CLOB?
Hello! I got a database with a clob. The database is initated with oracale "load data" and LOBFILE('PATH_TO_A_FILE'). I now need to update a certaion row in this table with a new CLOB. I got some foregin keys to this row so I can not delete an reinsert it. Is this possible to update the clob in some way? I tried like: UPDATE the_table set clob_column LOBFILE('PATH_TO_A_FILE') where id = 1; But it does not work. Any ideas is most welcome. Best regards Fredrik
Annonceindlæg fra Cognizant
16. april 2010 - 16:47
#1
I would do it in Java instead of SQL. :-) Some googling points to: UPDATE the_table SET clob_column = BFILENAME('dirnam', 'filenam') WHERE id = 1;
20. april 2010 - 19:47
#3
Hello Arne! I actually did not get it to work. I do not know if it has to do with that I use toad. I heard that it might work with dbvisualizer. How ever I solved it in this way: turn off constraints truncate the table initiate the complete table turn on the constraints But please give me a "svar" since your comment was most helpful! Best regards Fredrik