Solved

How to do Insert Into/Select with CLOB Columns?

Posted on 2014-11-20
4
425 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
select only modified column name  based on the status 15 55
selective queries 7 27
ORA-00923: FROM keyword not found where expected 3 59
Oracle collections 15 16
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

816 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

13 Experts available now in Live!

Get 1:1 Help Now