Solved

How to do Insert Into/Select with CLOB Columns?

Posted on 2014-11-20
4
397 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
Comment Utility
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
Comment Utility
What happens if I put to_clob? Table TB has no CLOB fields.
0
 

Author Comment

by:GurcanK
Comment Utility
I think you mean implicit conversion.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
>>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.

Join & Write a Comment

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

763 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

11 Experts available now in Live!

Get 1:1 Help Now