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: Chirag DBA <ChiragDBA_at_gmail.com>
Date: Thu, 14 Oct 2004 11:46:18 +0530
Message-ID: <1be1d2004101323161b463be3@mail.gmail.com>


As steve n nitch said, I tried the following query but not working.

update profile_customers a
set sp_type_cd = (select PROFILE_SP_TYPE_CD.SP_TYPE_CD from profile_sp_type_cd,profile_customers
where profile_customers.sp_type_cd=a.sp_type_cd) where exists ( select null from profile_sp_type_cd,
profile_customers.sp_type_cd = =profile_sp_type_cd.sp_type_name and and profile_cusomers.sp_type_cd=a.sp_type_cd);

But this is not working. I just wanna update the SP_TYPE_CD of profile_customers which has a VALUE rite now, table from the Profile_sp_type_cd.

I thought initially this will be simpler :(

On Wed, 13 Oct 2004 08:45:38 -0500, stephen.lee_at_dtag.com <stephen.lee_at_dtag.com> wrote:
>
> This seems to be a case for a "correlated update". Google on that, and see
> what you find.
>
> >-----Original Message-----
> >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
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Oct 14 2004 - 01:11:47 CDT

Original text of this message

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