Subject | Re: [ib-support] update problem |
---|---|
Author | Dirk Naudts |
Post date | 2002-07-16T21:05:24Z |
Ben,
try
UPDATE product P SET product_nm = (select product_nm
FROM new_product NP where NP.id = P.id)
where exists(select id FROM new_product NP where NP.id = P.id)
HTH
Dirk Naudts.
""Ben Johnson"" <ben_johns@...> wrote in message
news:20020716171638.30311.qmail@......
try
UPDATE product P SET product_nm = (select product_nm
FROM new_product NP where NP.id = P.id)
where exists(select id FROM new_product NP where NP.id = P.id)
HTH
Dirk Naudts.
""Ben Johnson"" <ben_johns@...> wrote in message
news:20020716171638.30311.qmail@......
> Hi,
>
> I have a product table which contains around 15000 records
> and a new_product table which contains around 1000 records.
> All the product id which contains in new_product table
> exists in product table also.
>
> When I tried to update product name in product table using
> the UPDATE statment given below, it is trying to update all
> the records in the product table that doesnt have an id
> in new_product. So it resulted in null replacement in the
> product name and the UPDATE statment gets aborted since null
> value is not allowed in product name.
>
> UPDATE product P SET product_nm = (select product_nm
> FROM new_product NP where NP.id = P.id) ;
>
> Is the above SQL statment correct? I just want to replace
> the product name in the product table with the name from
> the new_product table.
>
> Ben
> _________________________________________________________
> There is always a better job for you at Monsterindia.com.
> Go now http://monsterindia.rediff.com/jobs
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>