Solved

How to do Insert Into/Select with CLOB Columns?

Posted on 2014-11-20
4
411 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
  • 2
  • 2
4 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 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 76

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle 10g - insert string with special characters 8 41
PL SQL Search Across Columns 4 22
use lov values 2 37
constraint check 2 19
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

861 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

Need Help in Real-Time?

Connect with top rated Experts

30 Experts available now in Live!

Get 1:1 Help Now