ProductID ProductName SupplierID 1 Chai 1 2 Chang 1 3 Aniseed Syrup 1 9 Mishi Kobe Niku 4 10 Ikura 4 11 Queso Cabrales 5 12 Queso Manchego La Pastora 5 74 Longlife Tofu 4
ProductID ProductName SupplierID 1 Chai .v1 1 2 Chang.v1 1 3 Aniseed Syrup.v1 1 9 Mishi Kobe Niku.v1 4 10 Ikurav.14 4
Declare @Suffix varchar(10)='v.1' Update Product set ProductName=(select ProductName from Product where SupplierID in (1,4)+@Suffix) where where SupplierID in (1,4)
update product set productname = productname + '.v1' where supplierid in (1, 4); select * from product
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)