RE: Modify data from select before insert.

  • From: "Igor Neyman" <ineyman@xxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 19 Aug 2004 15:11:28 -0400

insert into table1
(
col1
)
select <any_function_you_wish>(col1) from tabl2;

Igor Neyman, OCP DBA
ineyman@xxxxxxxxxxxxxx



-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Lyndon Tiu
Sent: Thursday, August 19, 2004 2:04 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Modify data from select before insert.

Hello guys,

I could use a few tips here.

I have a sql statement:

insert into table1
(
col1
)
select col1 from tabl2;

Problem is, I need to modify the data in the column from table2 first
before inserting to table1. Like add a dash, after the third character
... chnage all A's to B's sort of thing.

Can you guys give me a few hints and perhaps a few keywords I can use to
search google for?

Thank you very much.

--
Lyndon Tiu
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: