this question has been asked a lot it seems, but I can't find any dealing with updates and the ones dealing with other stuff haven't helped. I feel like I'm missing something obvious but I can't put my finger on it.

I have the following query to update my table with IDs from another table to enable matching to a spreadsheet:

```
update TABLE3 set ITM_CD2 = 
(select pi.ITM_CD2
   from schema1.PI_TABLE pi,
        TABLE3 tb3
  where pi.OTHER_ITM_CD = tb3.OTHER_ITM_CD)

```

I can't actually go through with the update because I keep getting "needs a single-row subquery" issues.

EDIT: I should have mentioned that the pi table is from a separate schema. 

**EDIT 2:** For more detail; this is an example of what I'm trying to obtain:

TABLE 3 currently has this data, for instance:

```
NAME ----- PRODUCT ----- ITM_CD1 ----- ITM_CD2
X          Y             11            NULL
A          B             12            NULL
C          Y             11            NULL

```

I'm trying to attach data from this item table so I can get the 2nd itm\_cd which will allow me to compare it to a table that has ITM\_CD2 but NOT ITM\_CD1. The NULLs in TABLE 3 would be replaced with the matching ITM\_CD2.

The table I'm trying to take the ITM\_CD2 from would look like this:

```
PRODUCT ----- ITM_CD1 ----- ITM_CD2
A             10            90
Y             11            98
B             12            87

```