I'm trying to update multiple rows in a SQL Server table in VB.NET code. However, I am focusing on updating one row before I include more SELECT statements. I understand the following method is very flexible, but it is throwing the error "SQL command not properly ended":
UPDATE ndcs SET PACKAGE_TYPE_CODE = x.package_type_code, PACKAGE_DESC = x.package_desc, COMMENTS = x.comments FROM hub_non_dcs_product_pkgtype ndcs INNER JOIN (SELECT PRODUCT_ID = 'SEN0982_pdf_1', PACKAGE_TYPE_CODE = '', PACKAGE_DESC = '', COMMENTS = 'DPDC LITERATURE') x ON x.product_id = ndcs.product_id What is wrong with my syntax?
'SEN0982_pdf_1' AS PRODUCT_ID.... Or even, strip it right back and try with aWHEREclause from the off?