Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is it possible to write a result of query to a CLOB field in another table

206604Apr 5 2011 — edited Apr 5 2011
Hi all,

I have a table with 50 columns which will ideally have around 250,000 rows. I want to select all the rows from this table and insert the result in to another
table's CLOB or BLOB column. ( I think CLOB is preferred for strings !!)
f.i
Table1 : SELECT ID, COL1||','||COL2||','||COL3||','||COL4||','||COL5 FROM TF_TEMPREP
ORDER BY COL1
will have the output
A001, 1,ABN LAYOUT,01-APR-11,30-APR-11,REMARK1
A001, 2,CTS ,01-APR-11,10-APR-11,REMARK2
A001, 3,BTS,01-APR-11,20-APR-11,REMARK3
A001, 4,CWWS,01-JAN-11,31-JAN-11,REMARK4
A001, 5,ZYNC,01-MAR-11,31-MAR-11,REMARK5

I would like to store these rows into another table (TF_TEMPREP_OUTPUT) CLOB/BLOB column ,
so the table TF_TEMPREP_OUTPUT will have one row with all the rows from TF_TEMPREP in the CLOB/BLOB column.

TF_TEMPREP_OUTPUT will have column OUTPUTID (VARCHAR2) , OUTPUTDATA (CLOB DATATYPE)

Will this be possible !!.

Thanks in advance

Regards
Murali
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2011
Added on Apr 5 2011
6 comments
980 views