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
Create a host variable of the where in statement on the fly with dynamic SQL.continue reading
To solve the SQL error -321 on IBM i6.1, use the new values statement to overcome the error. If you are using an older release, declare a cursor ...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.