Re: UPDATE SQL

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 :(

 - Chirag 


On Wed, 13 Oct 2004 08:45:38 -0500, stephen.lee@xxxxxxxx
<stephen.lee@xxxxxxxx> 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

Other related posts: