?
Solved

How to do Insert Into/Select with CLOB Columns?

Posted on 2014-11-20
4
Medium Priority
?
521 Views
Last Modified: 2014-11-20
Dear Experts,

Could you confirm whether below SQL is valid or not, or could you please offer me an alternative?

Table TA (x number, y number, z clob)
Table TB (a number, b number, c varchar, d varchar, e varchar)

insert into TA (x,y,z,) select a, b, to_clob(concat(concat(c,d),e)) from TB;

BR
0
Comment
Question by:GurcanK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 total points
ID: 40455568
No need for to_clob:

insert into TA (x,y,z,) select a, b, concat(concat(c,d),e)  from TB;;

Since you keep asking "SQL is valid or not", again, set up a simple test and try it.
0
 

Author Comment

by:GurcanK
ID: 40455571
What happens if I put to_clob? Table TB has no CLOB fields.
0
 

Author Comment

by:GurcanK
ID: 40455576
I think you mean implicit conversion.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40455611
>>What happens if I put to_clob?

Nothing.

>>Table TB has no CLOB fields.

So?  You are inserting varchar2 objects into a CLOB field.  That is just fine.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to recover a database from a user managed backup
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question