Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Modify data from select before insert.

Re: Modify data from select before insert.

From: Raj Jamadagni <rjamya_at_yahoo.com>
Date: Thu, 19 Aug 2004 12:39:23 -0700 (PDT)
Message-ID: <20040819193923.33014.qmail@web50001.mail.yahoo.com>


Something like ...

insert into table1 (col1)
select replace(substr(col_1,1,2) || '-' || substr(col_1,3),'A','B')   from table2
/

??
Raj
--- Lyndon Tiu <ltiu_at_alumni.sfu.ca> wrote:

> 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_at_freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>



Best Regards
Raj

select mandatory_disclaimer from company_requirements;                 

Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Aug 19 2004 - 14:35:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US