You are missing a where clause....
If you are on DB2 V8 for LUW let's keep things simple and use MERGE instead
of UPDATE . It's easier to understand:
MERGE INTO componentdocument
USING document
ON document.documentUUID = componentdocument.componentUUID)
WHEN MATCHED THEN UPDATE SET componenttitle = title
Cheers
Serge
"Sudhir Anand - CTS "
<db2udbdba-ezmlmshield-x70077720.[Email address protected] wrote on
11/16/2005 09:44:16 AM:
> HI All,
>
> I want to update the title from one table to the title of another table.
>
> I am executing following query but it is giving problem .
>
> Please help asap.
>
> Update componentdocument
> Set componenttitle = (Select title from document where
document.documentUUID
> = componentdocument.componentUUID)
>
> Please let me know what's wrong with the Query. as i also want to join
the
> UUID's . Please suggest asap
>
>
----------------------------------------------------------------------------
> ---------------------------------------------------
> DISCLAIMER
> This email and any files transmitted with it are confidential and are
solely
> for the use of the individual or entity to which it is addressed. Any
use,
> distribution, copying or disclosure by any other person is strictly
> prohibited. If you receive this transmission in error, please notify the
> sender by reply email and then destroy the message. Opinions, conclusions
> and other information in this message that do not relate to official
> business of the company shall be understood to be neither given nor
endorsed
> by NIIT Ltd. or NIIT Technologies Ltd. Any information contained in this
> email, when addressed to Clients is subject to the terms and conditions
in
> governing client contract.
>
>
> ---------------------------------------------------------------------
> PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
> website: http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
DB2 & UDB email list listserv db2-l LazyDBA home page