Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update problem

Status
Not open for further replies.

jcisco

Programmer
Sep 17, 2002
125
US
I have a question I have a table that i want to be able to update by adding a ItemDescription to it. i have tried this

update tbl_TempBillOFLading set ItemDescription = ( select tblItems.ItemDescription FROM tbl_TempBillOFLading INNER JOIN tblItems ON tbl_TempBillOFLading.ItemNumber = tblItems.ItemNumber)

The tbl_TempBillOFLading table will have more than one of the same item on it but it will be in different fields (not rolled up). for example my table and i would like to add the description of the item without a cursor. but when i run the above query i get.

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.

(table example)
item QTY
-----------
ItemA 1
ItemA 3
ItemB 2 etc..


thanks




--------------
:)
 
Try using
select TOP 1 tblItems.ItemDescription FROM ...

That should do the trick.
MakeItSo

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top