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.
Microsoft SQL ServerMicrosoft SQL Server 2008
8/22/2022 - Mon
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!