RE: UPDATE SQL

  • From: "Lex de Haan" <lex.de.haan@xxxxxxxxxxxxxx>
  • To: <ChiragDBA@xxxxxxxxx>, <askdba@xxxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 13 Oct 2004 13:35:11 +0200

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@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Chirag DBA
Sent: Wednesday, October 13, 2004 12:17
To: askdba@xxxxxxxxxxxxx; oracle-l@xxxxxxxxxxxxx
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?

 - Chiku
--
//www.freelists.org/webpage/oracle-l



--
//www.freelists.org/webpage/oracle-l

Other related posts: