Here's the description of the two tables.
TBL1 TBL2 ------------ ------------ ID | VALUE ID | PRICE ------------ ----------- 1 | 10 1 | 100 2 | 20 2 | 200 3 | 30 3 | 300 ------------- ----------- SQL) UPDATE TBL1 SET VALUE=B.PRICE FROM TBL1 A INNER JOIN TBL2 B ON A.ID=B.ID
When I run the above query, I get the error message: "Column qualifier or table B undefined"
But this query works very well on MS SQL server. Please let me know if this is really impossible.
If just a subset of the rows are being updated than you'd have to add the following where clause Where exists (select 'x' from tbl2 t22 where t22.id=t1.id)
MORE INFORMATION ON THIS TOPIC
Visit the ITKnowledge Exchange and get answers to your DB2 questions fast.
Check out this Search400.com Featured Topic: Expert advice on DB2
Search400.com's targeted search engine: Get relevant information on DB2/400.
The Best Web Links: Tips, tutorials and more.
Dig deeper on DB2 UDB (universal databases)
Related Q&A from Kent Milligan
To monitor members stuck within a physical file on AS/400, you can periodically use the display file description (DSPFD) command to create an output ...continue reading
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ...continue reading
When developing tables in a parent-child relationship, use a primary key and a foreign key along with a unique ID to make your database easier to ...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.