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: UPDATE SQL

RE: UPDATE SQL

From: Lex de Haan <lex.de.haan_at_naturaljoin.nl>
Date: Wed, 13 Oct 2004 13:35:11 +0200
Message-ID: <JFEEIGBIDOCCDALDIPLNOENJCJAA.lex.de.haan@naturaljoin.nl>


you can use an updateable (inline) view to achieve this. see SQL Reference ...
Kind regards,
Lex.



visit http://www.naturaljoin.nl <http://www.naturaljoin.nl>

skype me <callto://lexdehaan>

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Chirag DBA Sent: Wednesday, October 13, 2004 12:17
To: askdba_at_freelists.org; oracle-l_at_freelists.org Subject: UPDATE SQL

Hi Friends,

I wanna update values of SP_TYPE_CD in PROFILE_CUSTOMERS which has a VALUES and I wanna put the SP_TYPE_CD from PROFILE_SP_TYPE_CD.

PROFILE_SP_TYPE_CD is a master table and PROFILE_CUSTOMERS is a child table.

I have written the following query.

update profile_customers set SP_TYPE_CD = PROFILE_SP_TYPE_CD.SP_TYPE_CD where profile_customers.sp_type_cd = profile_sp_type_cd.sp_type_name;

I don wanna run seperate queries for each row in PROFILE_SP_TYPE_CD. Cause my PROFILE_CUSTOMERS have more than 50000 records and this will be the pump running every nite.

Can I update that in a single SQL Statement?

--

http://www.freelists.org/webpage/oracle-l Received on Wed Oct 13 2004 - 06:30:48 CDT

Original text of this message

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