I have a table (holding_amazon) which contains orders from Amazon. I want to check that the "catID", the product SKU of the item, that was assigned to it when it was listed has no errors in the formatting by checking it's exists in another table (productCode) - this contains a list of approved SKU's.
I've written the following query which I thought would check that the SKU exists in the table "productCode" under the column "itemTitle" and if it is that it doesn't to set the value of "catID" to empty so that an exception report can pick it up later in the process.
update productCode, holding_amazon set holding_amazon.catID ='' where holding_amazon.catID <> productCode.itemTitle
When I test the above query it sets all the values for "catID" to empty even though 90% exist in "productCode" table ... what am I doing wrong?