Subject | Re: [ib-support] UPDATE problem |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2003-06-02T11:52:04Z |
At 11:20 02.06.2003 +0000, you wrote:
UPDATE product P
SET P.stock = (select T.stock from temp T
where P.id = T.product_id) ;
where exists(select 1 from temp t2 where p.id = t2.product_id)
HTH,
Set
>UPDATE product PYes and yes. Correct syntax is
>SET P.stock = (select T.stock from temp T
> where P.id = T.product_id) ;
>
>Is the statment is trying to update stock in table product
>with null values for products which does not exist in table
>temp ? If it is, is there a work around ?
UPDATE product P
SET P.stock = (select T.stock from temp T
where P.id = T.product_id) ;
where exists(select 1 from temp t2 where p.id = t2.product_id)
HTH,
Set