I have a table with 4 columns.
Id Description Barcode Type
1 A01 L001 Loc
2 A02 L002 Loc
3 B01 L003 Loc
4 Root L004 Parent
5 Emplacement L005 Parent
6 C01 L006 Loc
7 C02 L007 Loc
I want to make an UPDATE of the ‘Barcode’ column with the value in the ‘Description’ column where the Type column contains “Loc”.
I tried something like this:
UPDATE MyTable
SET Barcode=Description
WHERE Type='Loc'
It seems like I’m getting something wrong.
You need to quote
Locsince it is a string