Append Data into existing rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,
i want to append the item's qty from one table to another. both of the
table share similar attributes and the item code is the same in both table.
how do i append into the existing qty without appending new rows in the
table?

FYI:
INSERT INTO T_SRV_INVENTORY_INUSE (QTY)
SELECT T_SRV_INVENTORY.QTY
FROM T_SRV_INVENTORY_INUSE INNER JOIN T_SRV_INVENTORY ON
T_SRV_INVENTORY_INUSE.ITEMCODE = T_SRV_INVENTORY.ITEMCODE;
 
Appending is specifically for adding *new records* to a table. to
add/change/delete values in specific fields in *existing records*, use an
Update query. when you want to update values in only specific records
(rather than all records), start by creating a Select query to pull the
records you want. when that's working correctly, turn the Select query into
an Update query and proceed from there.

hth
 
ok thanks!

tina said:
Appending is specifically for adding *new records* to a table. to
add/change/delete values in specific fields in *existing records*, use an
Update query. when you want to update values in only specific records
(rather than all records), start by creating a Select query to pull the
records you want. when that's working correctly, turn the Select query into
an Update query and proceed from there.

hth
 
Back
Top