I have a statement that was created that finds and replaces data from one table to another. This works quite well and does the trick. We now need to add condition. We want to do the update and add that it only be a specific id that is updated.
The code that we currently use now is:
MERGE INTO [NYP-RetailDataSQL].dbo.[Sales-Comparison0830A]
ON md_Retailer = [Cust Id]
WHEN MATCHED THEN
SET WholesaleID = WHOLEID;
What I need to add is that I only want it to be when the WHOLEID = 120-MW.
Any help would be greatly appreciated as always.